![]() |
LibDriver AT24CXX
2.0.0
AT24CXX full-featured driver
|
at24cxx base driver modules More...
Data Structures | |
struct | at24cxx_handle_s |
at24cxx handle structure definition More... | |
struct | at24cxx_info_s |
at24cxx information structure definition More... | |
Typedefs | |
typedef struct at24cxx_handle_s | at24cxx_handle_t |
at24cxx handle structure definition More... | |
typedef struct at24cxx_info_s | at24cxx_info_t |
at24cxx information structure definition More... | |
Enumerations | |
enum | at24cxx_t { AT24C01 = 128 , AT24C02 = 256 , AT24C04 = 512 , AT24C08 = 1024 , AT24C16 = 2048 , AT24C32 = 4096 , AT24C64 = 8192 , AT24C128 = 16384 , AT24C256 = 32768 , AT24C512 = 65536 , AT24CM01 = 131072 , AT24CM02 = 262144 } |
at24cxx type enumeration definition More... | |
enum | at24cxx_address_t { AT24CXX_ADDRESS_A000 = 0 , AT24CXX_ADDRESS_A001 = 1 , AT24CXX_ADDRESS_A010 = 2 , AT24CXX_ADDRESS_A011 = 3 , AT24CXX_ADDRESS_A100 = 4 , AT24CXX_ADDRESS_A101 = 5 , AT24CXX_ADDRESS_A110 = 6 , AT24CXX_ADDRESS_A111 = 7 } |
at24cxx address enumeration definition More... | |
Functions | |
uint8_t | at24cxx_info (at24cxx_info_t *info) |
get chip's information More... | |
uint8_t | at24cxx_init (at24cxx_handle_t *handle) |
initialize the chip More... | |
uint8_t | at24cxx_deinit (at24cxx_handle_t *handle) |
close the chip More... | |
uint8_t | at24cxx_set_type (at24cxx_handle_t *handle, at24cxx_t type) |
set the chip type More... | |
uint8_t | at24cxx_get_type (at24cxx_handle_t *handle, at24cxx_t *type) |
get the chip type More... | |
uint8_t | at24cxx_set_addr_pin (at24cxx_handle_t *handle, at24cxx_address_t addr_pin) |
set the chip address pin More... | |
uint8_t | at24cxx_get_addr_pin (at24cxx_handle_t *handle, at24cxx_address_t *addr_pin) |
get the chip address pin More... | |
uint8_t | at24cxx_read (at24cxx_handle_t *handle, uint32_t address, uint8_t *buf, uint16_t len) |
read bytes from the chip More... | |
uint8_t | at24cxx_write (at24cxx_handle_t *handle, uint32_t address, uint8_t *buf, uint16_t len) |
write bytes to the chip More... | |
at24cxx base driver modules
typedef struct at24cxx_handle_s at24cxx_handle_t |
at24cxx handle structure definition
typedef struct at24cxx_info_s at24cxx_info_t |
at24cxx information structure definition
enum at24cxx_address_t |
at24cxx address enumeration definition
Definition at line 82 of file driver_at24cxx.h.
enum at24cxx_t |
at24cxx type enumeration definition
Definition at line 63 of file driver_at24cxx.h.
uint8_t at24cxx_deinit | ( | at24cxx_handle_t * | handle | ) |
close the chip
[in] | *handle | pointer to an at24cxx handle structure |
Definition at line 136 of file driver_at24cxx.c.
uint8_t at24cxx_get_addr_pin | ( | at24cxx_handle_t * | handle, |
at24cxx_address_t * | addr_pin | ||
) |
get the chip address pin
[in] | *handle | pointer to an at24cxx handle structure |
[out] | *addr_pin | pointer to a chip address pin |
Definition at line 231 of file driver_at24cxx.c.
uint8_t at24cxx_get_type | ( | at24cxx_handle_t * | handle, |
at24cxx_t * | type | ||
) |
get the chip type
[in] | *handle | pointer to an at24cxx handle structure |
[out] | *type | pointer to a chip type buffer |
Definition at line 188 of file driver_at24cxx.c.
uint8_t at24cxx_info | ( | at24cxx_info_t * | info | ) |
get chip's information
[out] | *info | pointer to an at24cxx info structure |
Definition at line 463 of file driver_at24cxx.c.
uint8_t at24cxx_init | ( | at24cxx_handle_t * | handle | ) |
initialize the chip
[in] | *handle | pointer to an at24cxx handle structure |
Definition at line 62 of file driver_at24cxx.c.
uint8_t at24cxx_read | ( | at24cxx_handle_t * | handle, |
uint32_t | address, | ||
uint8_t * | buf, | ||
uint16_t | len | ||
) |
read bytes from the chip
[in] | *handle | pointer to an at24cxx handle structure |
[in] | address | register address |
[out] | *buf | pointer to a data buffer |
[in] | len | buffer length |
Definition at line 257 of file driver_at24cxx.c.
uint8_t at24cxx_set_addr_pin | ( | at24cxx_handle_t * | handle, |
at24cxx_address_t | addr_pin | ||
) |
set the chip address pin
[in] | *handle | pointer to an at24cxx handle structure |
[in] | addr_pin | chip address pin |
Definition at line 209 of file driver_at24cxx.c.
uint8_t at24cxx_set_type | ( | at24cxx_handle_t * | handle, |
at24cxx_t | type | ||
) |
set the chip type
[in] | *handle | pointer to an at24cxx handle structure |
[in] | type | chip type |
Definition at line 167 of file driver_at24cxx.c.
uint8_t at24cxx_write | ( | at24cxx_handle_t * | handle, |
uint32_t | address, | ||
uint8_t * | buf, | ||
uint16_t | len | ||
) |
write bytes to the chip
[in] | *handle | pointer to an at24cxx handle structure |
[in] | address | register address |
[in] | *buf | pointer to a data buffer |
[in] | len | buffer length |
Definition at line 362 of file driver_at24cxx.c.