clickid 2.1.0.0
|
API for configuring and manipulating ClickID driver. More...
Topics | |
ClickID Commands List | |
List of commands of ClickID driver. | |
ClickID Settings | |
Settings of ClickID driver. | |
ClickID MikroBUS Map | |
MikroBUS pin mapping of ClickID driver. | |
Functions | |
void | clickid_cfg_setup (clickid_cfg_t *cfg) |
ClickID configuration object setup function. | |
err_t | clickid_init (clickid_t *ctx, clickid_cfg_t *cfg) |
ClickID initialization function. | |
void | clickid_deinit (clickid_t *ctx) |
ClickID de-initialization function. | |
err_t | clickid_check_communication (clickid_t *ctx) |
ClickID check communication function. | |
err_t | clickid_read_memory (clickid_t *ctx, uint16_t address, uint8_t *data_out, uint16_t len) |
ClickID read memory function. | |
err_t | clickid_write_memory (clickid_t *ctx, uint16_t address, uint8_t *data_in, uint16_t len) |
ClickID write memory function. | |
err_t | clickid_read_information (clickid_t *ctx, clickid_information_t *info) |
ClickID read information function. | |
API for configuring and manipulating ClickID driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void clickid_cfg_setup | ( | clickid_cfg_t * | cfg | ) |
ClickID configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : configuration structure. See clickid_cfg_t object definition for detailed explanation. |
err_t clickid_check_communication | ( | clickid_t * | ctx | ) |
ClickID check communication function.
This function checks the communication by reading the ROM address as well as verifying family code and CRC 8.
[in] | ctx | : context object. See clickid_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void clickid_deinit | ( | clickid_t * | ctx | ) |
ClickID de-initialization function.
This function de-initializes One Wire driver and sets the RST pin to HIGH logic state.
[out] | ctx | : context object. See clickid_t object definition for detailed explanation. |
err_t clickid_init | ( | clickid_t * | ctx, |
clickid_cfg_t * | cfg ) |
ClickID initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : context object. See clickid_t object definition for detailed explanation. |
[in] | cfg | : configuration structure. See clickid_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t clickid_read_information | ( | clickid_t * | ctx, |
clickid_information_t * | info ) |
ClickID read information function.
This function reads the click board information from the permanent data memory.
[in] | ctx | : context object. See clickid_t object definition for detailed explanation. |
[out] | info | : Click board information. See clickid_information_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t clickid_read_memory | ( | clickid_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_out, | ||
uint16_t | len ) |
ClickID read memory function.
This function reads a desired number of data bytes starting from the selected address of the EEPROM memory using One Wire communication protocol.
[in] | ctx | : context object. See clickid_t object definition for detailed explanation. |
[in] | address | : Starting address. |
[out] | data_out | : Output data buffer. |
[in] | len | : Number of data bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t clickid_write_memory | ( | clickid_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_in, | ||
uint16_t | len ) |
ClickID write memory function.
This function writes a desired number of data bytes starting from the selected address of the EEPROM memory using One Wire communication protocol.
[in] | ctx | : context object. See clickid_t object definition for detailed explanation. |
[in] | address | : Starting address, must be aligned to the page start. |
[in] | data_in | : Data input buffer. |
[in] | len | : Number of data bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.