-
Notifications
You must be signed in to change notification settings - Fork 0
/
w25q128.h
29 lines (18 loc) · 920 Bytes
/
w25q128.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef W25Q128_H
#define W25Q128_H
#include "nrf_drv_spi.h"
#define SPI_BUFSIZE 132
void spi_init(nrf_drv_spi_t const * const instance);
ret_code_t w25q128_reset(nrf_drv_spi_t const * const instance);
ret_code_t w25q128_read_page(nrf_drv_spi_t const * const instance,
uint32_t page_address,
uint8_t * p_rx_buffer,
uint16_t rx_buffer_length);
ret_code_t w25q128_enable_write(nrf_drv_spi_t const * const instance);
ret_code_t w25q128_disable_write(nrf_drv_spi_t const * const instance);
ret_code_t w25q128_Erase_Sector (nrf_drv_spi_t const * const instance, uint16_t numsector);
ret_code_t w25q128_write_page(nrf_drv_spi_t const * const instance,
uint32_t page_address,
uint8_t const * p_tx_buffer,
uint16_t tx_buffer_length);
#endif