I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
FM24C_ex.h File Reference

FM24C FRAM Driver (bank switching at I2C address level protocol) extensions. More...

#include "sarmfsw.h"
#include "FM24C.h"
Include dependency graph for FM24C_ex.h:
This graph shows which files directly or indirectly include this file:

Macros

#define FM24C_Read_Type(cpnt, name, type, addr)
 Macro to create function to read value(s) from FM24C.
 
#define FM24C_Write_Type(cpnt, name, type, addr)
 Macro to create function to write value(s) to FM24C.
 

Functions

FctERR FM24C_Mass_Erase (FM24C_t *const pCpnt)
 Mass erase of FM24C.
 
void FM24C_WP_GPIO_Init (FM24C_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Write Protect GPIO pin init for FM24C.
 
void FM24C_WP_GPIO_Get (const FM24C_t *const pCpnt, bool *const pState)
 Write Protect GPIO pin getter for FM24C.
 

Detailed Description

FM24C FRAM Driver (bank switching at I2C address level protocol) extensions.

Author
SMFSW

FM24C16B: 16-Kbit (2K * 8) Serial I2C F-RAM FM24C04B: 4-Kbit (512 * 8) Serial I2C F-RAM

Note
Compatibility (tested):
  • FM24C16B
  • FM24C04B
  • BR24T04FVM

Macro Definition Documentation

◆ FM24C_Read_Type

#define FM24C_Read_Type ( cpnt,
name,
type,
addr )
Value:
__INLINE FctERR NONNULL_INLINE__ FM24C_Get_##name(type * rd) { \
return FM24C_Read(cpnt, &rd, addr, sizeof(type)); }
FctERR FM24C_Read(FM24C_t *const pCpnt, uint8_t *const data, const uint16_t addr, const uint16_t nb)
I2C Read function for FM24C.
Definition FM24C.c:140

Macro to create function to read value(s) from FM24C.

◆ FM24C_Write_Type

#define FM24C_Write_Type ( cpnt,
name,
type,
addr )
Value:
__INLINE FctERR INLINE__ FM24C_Set_##name(type wr) { \
return FM24C_Write(cpnt, &wr, addr, sizeof(type)); }
FctERR FM24C_Write(FM24C_t *const pCpnt, const uint8_t *const data, const uint16_t addr, const uint16_t nb)
I2C Write function for FM24C.
Definition FM24C.c:134

Macro to create function to write value(s) to FM24C.

Function Documentation

◆ FM24C_Mass_Erase()

FctERR FM24C_Mass_Erase ( FM24C_t *const pCpnt)

Mass erase of FM24C.

Parameters
[in]pCpnt- Pointer to FM24C component
Returns
FctERR - error code
Here is the call graph for this function:

◆ FM24C_WP_GPIO_Get()

void FM24C_WP_GPIO_Get ( const FM24C_t *const pCpnt,
bool *const pState )

Write Protect GPIO pin getter for FM24C.

Weak Functions
FM24C Write Protect GPIO pin getter may be user implemented if needed
Parameters
[in]pCpnt- Pointer to FM24C component
[in,out]pState- Pointer to WP pin state variable (0: inactive, 1: active)

◆ FM24C_WP_GPIO_Init()

void FM24C_WP_GPIO_Init ( FM24C_t *const pCpnt,
GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Write Protect GPIO pin init for FM24C.

Weak Functions
FM24C Write Protect GPIO pin init may be user implemented if needed
Parameters
[in]pCpnt- Pointer to FM24C component
[in]GPIOx- WP port
[in]GPIO_Pin- WP pin
[in]GPIO_ActiveWP pin active state
Here is the call graph for this function: