# modules/fram/fram.h File Reference

`#include <mios32_config.h>`

## Defines
#define | FRAM_IIC_PORT 1
#define | FRAM_MULTIPLEX_ENABLE 1
#define | FRAM_MULTIPLEX_PORT_MSB GPIOC
#define | FRAM_MULTIPLEX_PIN_MSB GPIO_Pin_13
#define | FRAM_MULTIPLEX_PORT_LSB GPIOC
#define | FRAM_MULTIPLEX_PIN_LSB GPIO_Pin_14
#define | FRAM_ERROR_TRANSFER_TYPE -1
#define | FRAM_ERROR_DEVICE_BLOCKED -2
## Enumerations
enum | FRAM_transfer_t { FRAM_ReadTransfer, FRAM_WriteTransfer }
## Functions
s32 | FRAM_Init (u8 mode)
s32 | FRAM_CheckAvailable (u8 device_addr)
s32 | FRAM_Read (u8 device_addr, u16 mem_addr, u8 *buffer, u16 buffer_len)
s32 | FRAM_Write (u8 device_addr, u16 mem_addr, u8 *buffer, u16 buffer_len)
s32 | FRAM_Transfer (FRAM_transfer_t transfer_type, u8 device_addr, u16 mem_addr, u8 *buffer, u16 buffer_len)
s32 | FRAM_TransferWaitCheck (u8 blocking)
s32 | FRAM_SemaphoreEnter (u8 blocking)
void | FRAM_SemaphoreLeave (void)

## Define Documentation

#define FRAM_ERROR_DEVICE_BLOCKED -2

#define FRAM_ERROR_TRANSFER_TYPE -1

#define FRAM_IIC_PORT 1

#define FRAM_MULTIPLEX_ENABLE 1

#define FRAM_MULTIPLEX_PIN_LSB GPIO_Pin_14

#define FRAM_MULTIPLEX_PIN_MSB GPIO_Pin_13

#define FRAM_MULTIPLEX_PORT_LSB GPIOC

#define FRAM_MULTIPLEX_PORT_MSB GPIOC

## Enumeration Type Documentation

enum FRAM_transfer_t

Enumerator:

  FRAM_ReadTransfer |
  FRAM_WriteTransfer |

## Function Documentation

s32 FRAM_CheckAvailable | ( | u8 | device_addr | ) |

Here is the call graph for this function:

s32 FRAM_Init | ( | u8 | mode | ) |

Here is the call graph for this function:

s32 FRAM_Read | ( | u8 | device_addr,
|  | u16 | mem_addr,
|  | u8 * | buffer,
|  | u16 | buffer_len |
| ) |  |  |

Here is the call graph for this function:

s32 FRAM_SemaphoreEnter | ( | u8 | blocking | ) |

Here is the call graph for this function:

void FRAM_SemaphoreLeave | ( | void |  | ) |

Here is the call graph for this function:

s32 FRAM_Transfer | ( | FRAM_transfer_t | transfer_type,
|  | u8 | device_addr,
|  | u16 | mem_addr,
|  | u8 * | buffer,
|  | u16 | buffer_len |
| ) |  |  |

Here is the call graph for this function:

s32 FRAM_TransferWaitCheck | ( | u8 | blocking | ) |

Here is the call graph for this function:

s32 FRAM_Write | ( | u8 | device_addr,
|  | u16 | mem_addr,
|  | u8 * | buffer,
|  | u16 | buffer_len |
| ) |  |  |

Here is the call graph for this function: