ir2 2.0.0.0
|
API for configuring and manipulating IR 2 Click driver. More...
Topics | |
IR 2 Device Settings | |
Settings for configuration of IR 2 Click driver. | |
IR 2 MikroBUS Map | |
MikroBUS pin mapping of IR 2 Click driver. | |
Functions | |
void | ir2_cfg_setup (ir2_cfg_t *cfg) |
IR 2 configuration object setup function. | |
void | ir2_drv_interface_selection (ir2_cfg_t *cfg, ir2_drv_t drv_sel) |
IR 2 driver interface setup function. | |
err_t | ir2_init (ir2_t *ctx, ir2_cfg_t *cfg) |
IR 2 initialization function. | |
uint8_t | ir2_get_out_pin (ir2_t *ctx) |
IR 2 get OUT pin function. | |
void | ir2_nec_send_data (ir2_t *ctx, uint8_t address, uint8_t data_in) |
IR 2 NEC send data function. | |
err_t | ir2_nec_read_data (ir2_t *ctx, uint8_t *address, uint8_t *data_out) |
IR 2 NEC read data function. | |
API for configuring and manipulating IR 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void ir2_cfg_setup | ( | ir2_cfg_t * | cfg | ) |
IR 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ir2_cfg_t object definition for detailed explanation. |
IR 2 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See ir2_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See ir2_drv_t object definition for detailed explanation. |
uint8_t ir2_get_out_pin | ( | ir2_t * | ctx | ) |
IR 2 get OUT pin function.
This function returns the OUT pin logic state.
[in] | ctx | : Click context object. See ir2_t object definition for detailed explanation. |
IR 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ir2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ir2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ir2_nec_read_data | ( | ir2_t * | ctx, |
uint8_t * | address, | ||
uint8_t * | data_out ) |
IR 2 NEC read data function.
This function reads an address and data bytes by using NEC protocol.
[in] | ctx | : Click context object. See ir2_t object definition for detailed explanation. |
[out] | address | : Output read address byte. |
[out] | data_out | : Output read data byte. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void ir2_nec_send_data | ( | ir2_t * | ctx, |
uint8_t | address, | ||
uint8_t | data_in ) |
IR 2 NEC send data function.
This function sends an address and data bytes using NEC protocol.
[in] | ctx | : Click context object. See ir2_t object definition for detailed explanation. |
[in] | address | : Input address data. |
[in] | data_in | : Input data byte. |