TWI flash driver.
More...
#include <neorv32.h>
#include <config.h>
#include <twi_flash.h>
◆ twi_flash_delay_twi_tick()
void twi_flash_delay_twi_tick |
( |
int | tick_count | ) |
|
Keeps TWI Peripheral in IDLE for 'tick_count' TWI clock ticks.
- Parameters
-
tick_count | Amount of TWI NOP ticks to wait |
◆ twi_flash_read_word()
int twi_flash_read_word |
( |
uint32_t | addr, |
|
|
uint32_t * | rdata ) |
Read 32-bit word from word-aligned TWI flash address.
- Parameters
-
[in] | addr | Word-aligned address. |
[in,out] | rdata | Pointer for returned data (uint32_t). |
- Returns
- 0 if success, != 0 if error
◆ twi_flash_write_byte()
int twi_flash_write_byte |
( |
uint32_t | addr, |
|
|
uint8_t | wdata, |
|
|
int | stop ) |
Write single byte to TWI flash.
- Parameters
-
addr | TWI flash write address. |
wdata | TWI flash write data. |
stop | Send TWI stop command at end of transmission |
- Returns
- 0 if success, !=0 if error
◆ twi_flash_write_word()
int twi_flash_write_word |
( |
uint32_t | addr, |
|
|
uint32_t | wdata ) |
Write word to TWI flash.
- Parameters
-
addr | TWI flash write address. |
wdata | TWI flash write data. |
- Returns
- 0 if success, !=0 if error