eeprom6 2.0.0.0
|
API for configuring and manipulating EEPROM 6 Click driver. More...
Topics | |
EEPROM 6 Commands List | |
List of commands of EEPROM 6 Click driver. | |
EEPROM 6 Settings | |
Settings of EEPROM 6 Click driver. | |
EEPROM 6 MikroBUS Map | |
MikroBUS pin mapping of EEPROM 6 Click driver. | |
Functions | |
void | eeprom6_cfg_setup (eeprom6_cfg_t *cfg) |
EEPROM 6 configuration object setup function. | |
void | eeprom6_gpio_selection (eeprom6_cfg_t *cfg, eeprom6_gpio_sel_t gpio_sel) |
EEPROM 6 driver interface setup function. | |
err_t | eeprom6_init (eeprom6_t *ctx, eeprom6_cfg_t *cfg) |
EEPROM 6 initialization function. | |
err_t | eeprom6_default_cfg (eeprom6_t *ctx) |
EEPROM 6 default configuration function. | |
err_t | eeprom6_check_communication (eeprom6_t *ctx) |
EEPROM 6 check communication function. | |
err_t | eeprom6_select_device (eeprom6_t *ctx) |
EEPROM 6 select device function. | |
err_t | eeprom6_read_scratchpad (eeprom6_t *ctx, uint8_t *scratchpad, uint8_t scratchpad_len) |
EEPROM 6 read scratchpad function. | |
err_t | eeprom6_write_scratchpad (eeprom6_t *ctx, uint8_t *scratchpad, uint8_t scratchpad_len) |
EEPROM 6 write scratchpad function. | |
err_t | eeprom6_read_mem (eeprom6_t *ctx, uint16_t reg_adr, uint8_t *data_in, uint16_t n_len) |
EEPROM 6 read memory function. | |
err_t | eeprom6_write_mem (eeprom6_t *ctx, uint16_t reg_adr, uint8_t *data_in, uint16_t n_len) |
EEPROM 6 write memory function. | |
API for configuring and manipulating EEPROM 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void eeprom6_cfg_setup | ( | eeprom6_cfg_t * | cfg | ) |
EEPROM 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See eeprom6_cfg_t object definition for detailed explanation. |
err_t eeprom6_check_communication | ( | eeprom6_t * | ctx | ) |
EEPROM 6 check communication function.
This function checks the communication by reading the ROM address twice and comparing the two results, as well as verifying the family code byte.
[in] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom6_default_cfg | ( | eeprom6_t * | ctx | ) |
EEPROM 6 default configuration function.
This function executes a default configuration of EEPROM 6 click board.
[in] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
0
- Success, -1
- Error.void eeprom6_gpio_selection | ( | eeprom6_cfg_t * | cfg, |
eeprom6_gpio_sel_t | gpio_sel ) |
EEPROM 6 driver interface setup function.
This function sets a communication GPIO pin which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See eeprom6_cfg_t object definition for detailed explanation. |
[in] | gpio_sel | : GPIO pin selection. See eeprom6_gpio_sel_t object definition for detailed explanation. |
err_t eeprom6_init | ( | eeprom6_t * | ctx, |
eeprom6_cfg_t * | cfg ) |
EEPROM 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See eeprom6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t eeprom6_read_mem | ( | eeprom6_t * | ctx, |
uint16_t | reg_adr, | ||
uint8_t * | data_in, | ||
uint16_t | n_len ) |
EEPROM 6 read memory function.
This function reads a sequential data starting from the targeted 16-bit register address of the DS28EC20.
[in] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
[in] | reg_adr | : 16-bit memory address. |
[in] | data_in | : Pointer to the memory location where data to be stored. |
[in] | n_len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom6_read_scratchpad | ( | eeprom6_t * | ctx, |
uint8_t * | scratchpad, | ||
uint8_t | scratchpad_len ) |
EEPROM 6 read scratchpad function.
This function reads a desired number of scratchpad bytes using One Wire communication protocol.
[in] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
[out] | scratchpad | : Output read scratchpad. |
[in] | scratchpad_len | : Scratchpad length in bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom6_select_device | ( | eeprom6_t * | ctx | ) |
EEPROM 6 select device function.
This function selects the device by performing a skip or match ROM commands depending on the address value set in the ctx->address.
[in] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom6_write_mem | ( | eeprom6_t * | ctx, |
uint16_t | reg_adr, | ||
uint8_t * | data_in, | ||
uint16_t | n_len ) |
EEPROM 6 write memory function.
This function writes a sequential data starting of the targeted 16-bit register address of the DS28EC20.
[in] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
[in] | reg_adr | : Target address to which data is copied from the scratchpad. |
[in] | data_in | : Pointer to the data to be written. |
[in] | n_len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom6_write_scratchpad | ( | eeprom6_t * | ctx, |
uint8_t * | scratchpad, | ||
uint8_t | scratchpad_len ) |
EEPROM 6 write scratchpad function.
This function writes a desired number of scratchpad bytes using One Wire communication protocol.
[in] | ctx | : Click context object. See eeprom6_t object definition for detailed explanation. |
[in] | scratchpad | : Scratchpad to be written. |
[in] | scratchpad_len | : Scratchpad length in bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.