F439_CPP_TX-RX_LoRa_Project

Loading...
Searching...
No Matches
Functions | Variables
ada1897_mb85rs64b.c File Reference
Firmware Architecture » Persistence Layer

MB85RS64B SPI FRAM driver implementation. More...

`#include "main.h"`
`#include "ada1897_mb85rs64b.h"`
Include dependency graph for ada1897_mb85rs64b.c:

## Functions
void | FRAM_init (SPI_HandleTypeDef *hspix)
| Initialize the MB85RS64B device interface.
bool | FRAM_write (uint16_t address, uint8_t byte)
| Write a single byte to FRAM.
bool | FRAM_read (uint16_t address, uint8_t *byte)
| Read a single byte from FRAM.
bool | FRAM_WriteBytes (uint16_t address, uint8_t *pData, uint16_t size)
| Write a contiguous block of bytes to FRAM.
bool | FRAM_ReadBytes (uint16_t address, uint8_t *pData, uint16_t size)
| Read a contiguous block of bytes from FRAM.

## Variables
const uint8_t | FRAM_WRSR = 0b00000001
const uint8_t | FRAM_WRITE = 0b00000010
const uint8_t | FRAM_READ = 0b00000011
const uint8_t | FRAM_WRDI = 0b00000100
const uint8_t | FRAM_RDSR = 0b00000101
const uint8_t | FRAM_WREN = 0b00000110
SPI_HandleTypeDef * | hspi

## Detailed Description

MB85RS64B SPI FRAM driver implementation.

## Function Documentation

## ◆ FRAM_init()

void FRAM_init | ( | SPI_HandleTypeDef * | hspix | ) |

Initialize the MB85RS64B device interface.

Initialize the MB85RS64B driver instance.

## ◆ FRAM_read()

bool FRAM_read | ( | uint16_t | address,
|  | uint8_t * | byte )

Read a single byte from FRAM.

Parameters

  address | FRAM byte address.
  byte | Output pointer for the returned byte.

Returns
  true if the transaction succeeded, otherwise false.

## ◆ FRAM_ReadBytes()

bool FRAM_ReadBytes | ( | uint16_t | address,
|  | uint8_t * | pData,
|  | uint16_t | size )

Read a contiguous block of bytes from FRAM.

Read a contiguous byte range from FRAM.

## ◆ FRAM_write()

bool FRAM_write | ( | uint16_t | address,
|  | uint8_t | byte )

Write a single byte to FRAM.

Parameters

  address | FRAM byte address.
  byte | Data byte to write.

Returns
  true if the transaction succeeded, otherwise false.

## ◆ FRAM_WriteBytes()

bool FRAM_WriteBytes | ( | uint16_t | address,
|  | uint8_t * | pData,
|  | uint16_t | size )

Write a contiguous block of bytes to FRAM.

Write a contiguous byte range to FRAM.

## Variable Documentation

## ◆ FRAM_RDSR

const uint8_t FRAM_RDSR = 0b00000101

## ◆ FRAM_READ

const uint8_t FRAM_READ = 0b00000011

## ◆ FRAM_WRDI

const uint8_t FRAM_WRDI = 0b00000100

## ◆ FRAM_WREN

const uint8_t FRAM_WREN = 0b00000110

## ◆ FRAM_WRITE

const uint8_t FRAM_WRITE = 0b00000010

## ◆ FRAM_WRSR

const uint8_t FRAM_WRSR = 0b00000001

## ◆ hspi

SPI_HandleTypeDef* hspi