LibDriver FM24CLXX
Loading...
Searching...
No Matches
driver_fm24clxx.h File Reference

driver fm24clxx header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_fm24clxx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fm24clxx_handle_s
 fm24clxx handle structure definition More...
struct  fm24clxx_info_s
 fm24clxx information structure definition More...

Macros

#define DRIVER_FM24CLXX_LINK_INIT(HANDLE, STRUCTURE)
 initialize fm24clxx_handle_t structure
#define DRIVER_FM24CLXX_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_FM24CLXX_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_FM24CLXX_LINK_IIC_READ(HANDLE, FUC)
 link iic_read function
#define DRIVER_FM24CLXX_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write function
#define DRIVER_FM24CLXX_LINK_IIC_READ_ADDRESS16(HANDLE, FUC)
 link iic_read_address16 function
#define DRIVER_FM24CLXX_LINK_IIC_WRITE_ADDRESS16(HANDLE, FUC)
 link iic_write_address16 function
#define DRIVER_FM24CLXX_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_FM24CLXX_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct fm24clxx_handle_s fm24clxx_handle_t
 fm24clxx handle structure definition
typedef struct fm24clxx_info_s fm24clxx_info_t
 fm24clxx information structure definition

Enumerations

enum  fm24clxx_t { FM24CL04B = 512 , FM24CL16B = 2048 , FM24CL64B = 8192 }
 fm24clxx type enumeration definition More...
enum  fm24clxx_address_t {
  FM24CLXX_ADDRESS_A000 = 0 , FM24CLXX_ADDRESS_A001 = 1 , FM24CLXX_ADDRESS_A010 = 2 , FM24CLXX_ADDRESS_A011 = 3 ,
  FM24CLXX_ADDRESS_A100 = 4 , FM24CLXX_ADDRESS_A101 = 5 , FM24CLXX_ADDRESS_A110 = 6 , FM24CLXX_ADDRESS_A111 = 7
}
 fm24clxx address enumeration definition More...

Functions

uint8_t fm24clxx_info (fm24clxx_info_t *info)
 get chip's information
uint8_t fm24clxx_init (fm24clxx_handle_t *handle)
 initialize the chip
uint8_t fm24clxx_deinit (fm24clxx_handle_t *handle)
 close the chip
uint8_t fm24clxx_set_type (fm24clxx_handle_t *handle, fm24clxx_t type)
 set the chip type
uint8_t fm24clxx_get_type (fm24clxx_handle_t *handle, fm24clxx_t *type)
 get the chip type
uint8_t fm24clxx_set_addr_pin (fm24clxx_handle_t *handle, fm24clxx_address_t addr_pin)
 set the chip address pin
uint8_t fm24clxx_get_addr_pin (fm24clxx_handle_t *handle, fm24clxx_address_t *addr_pin)
 get the chip address pin
uint8_t fm24clxx_read (fm24clxx_handle_t *handle, uint16_t address, uint8_t *buf, uint16_t len)
 read bytes from the chip
uint8_t fm24clxx_write (fm24clxx_handle_t *handle, uint16_t address, uint8_t *buf, uint16_t len)
 write bytes to the chip

Detailed Description

driver fm24clxx 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.

Version
1.0.0
Author
Shifeng Li
Date
2021-06-15

history

Date Version Author Description
2021/06/15 1.0 Shifeng Li first upload

Definition in file driver_fm24clxx.h.