![]() |
LibDriver AT24CXX
2.0.0
AT24CXX full-featured driver
|
driver at24cxx header file More...
#include <stdio.h>
#include <stdint.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | at24cxx_handle_s |
at24cxx handle structure definition More... | |
struct | at24cxx_info_s |
at24cxx information structure definition More... | |
Macros | |
#define | DRIVER_AT24CXX_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE)) |
initialize at24cxx_handle_t structure More... | |
#define | DRIVER_AT24CXX_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC |
link iic_init function More... | |
#define | DRIVER_AT24CXX_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC |
link iic_deinit function More... | |
#define | DRIVER_AT24CXX_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC |
link iic_read function More... | |
#define | DRIVER_AT24CXX_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC |
link iic_write function More... | |
#define | DRIVER_AT24CXX_LINK_IIC_READ_ADDRESS16(HANDLE, FUC) (HANDLE)->iic_read_address16 = FUC |
link iic_read_address16 function More... | |
#define | DRIVER_AT24CXX_LINK_IIC_WRITE_ADDRESS16(HANDLE, FUC) (HANDLE)->iic_write_address16 = FUC |
link iic_write_address16 function More... | |
#define | DRIVER_AT24CXX_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC |
link delay_ms function More... | |
#define | DRIVER_AT24CXX_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC |
link debug_print function 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... | |
driver at24cxx header file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Date | Version | Author | Description |
---|---|---|---|
2021/02/17 | 2.0 | Shifeng Li | format the code |
2020/10/15 | 1.0 | Shifeng Li | first upload |
Definition in file driver_at24cxx.h.