shutter 2.1.0.0
Shutter Click Driver

API for configuring and manipulating Shutter Click driver. More...

Topics

 Shutter Settings
 Settings of Shutter Click driver.
 
 Shutter MikroBUS Map
 MikroBUS pin mapping of Shutter Click driver.
 

Functions

void shutter_cfg_setup (shutter_cfg_t *cfg)
 Shutter configuration object setup function.
 
err_t shutter_init (shutter_t *ctx, shutter_cfg_t *cfg)
 Shutter initialization function.
 
void shutter_set_auto_focus (shutter_t *ctx, uint8_t state)
 Shutter set auto focus function.
 
void shutter_set_shutter (shutter_t *ctx, uint8_t state)
 Shutter set shutter function.
 
void shutter_take_picture (shutter_t *ctx, uint8_t auto_focus)
 Shutter take picture function.
 

Detailed Description

API for configuring and manipulating Shutter Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ shutter_cfg_setup()

void shutter_cfg_setup ( shutter_cfg_t * cfg)

Shutter configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See shutter_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ shutter_init()

err_t shutter_init ( shutter_t * ctx,
shutter_cfg_t * cfg )

Shutter initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See shutter_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See shutter_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ shutter_set_auto_focus()

void shutter_set_auto_focus ( shutter_t * ctx,
uint8_t state )

Shutter set auto focus function.

This function sets the auto focus ON/OFF by setting the AF pin to desired logic state.

Parameters
[in]ctx: Click context object. See shutter_t object definition for detailed explanation.
[in]state: Auto focus state: 0 - OFF, 1 - ON.
Returns
None.
Note
None.

◆ shutter_set_shutter()

void shutter_set_shutter ( shutter_t * ctx,
uint8_t state )

Shutter set shutter function.

This function sets the shutter ON/OFF by setting the SHT pin to desired logic state.

Parameters
[in]ctx: Click context object. See shutter_t object definition for detailed explanation.
[in]state: Shutter state: 0 - OFF, 1 - ON.
Returns
None.
Note
None.

◆ shutter_take_picture()

void shutter_take_picture ( shutter_t * ctx,
uint8_t auto_focus )

Shutter take picture function.

This function sets AF and SHT pins to desired states for taking pictures with or without auto focus function.

Parameters
[in]ctx: Click context object. See shutter_t object definition for detailed explanation.
[in]auto_focus: Auto focus state:
  • 0 - OFF - disables auto focus then triggers shutter,
  • 1 - ON - enables auto focus then triggers shutter.
Returns
None.
Note
None.