Connection of the AT45DBX DataFlash to SPI interface driver.
This file manages the connection of the AT45dbx DataFlash driver to an SPI service (could be spi master service or usart in spi mode). The SPI service selection depends on AT45DBX_USES_SPI_MASTER_SERVICE or AT45DBX_USES_USART_SPI_SERVICE in conf_at45dbx.h
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
#include "conf_at45dbx.h"
Macros | |
#define | AT45DBX_CS_ID(slot, unused) { .id = AT45DBX_CS##slot}, |
#define | AT45DBX_DESELECT(slot, unused) |
#define | AT45DBX_SELECT(slot, unused) |
Functions to connect the DataFlash driver with the SPI Multiple-Sector Access Functions | |
#define | at45dbx_drv_device ATPASTE2(driver, _device) |
#define | at45dbx_drv_setup_device ATPASTE2(driver, _setup_device) |
#define | at45dbx_drv_select_device ATPASTE2(driver, _select_device) |
#define | at45dbx_drv_deselect_device ATPASTE2(driver, _deselect_device) |
#define | at45dbx_drv_write_packet ATPASTE2(driver, _write_packet) |
#define | at45dbx_drv_read_packet ATPASTE2(driver, _read_packet) |
#define | AT45DBX_CS0 AT45DBX_CS |
static struct at45dbx_drv_device | at45dbx_devices [] |
void | at45dbx_spi_init (void) |
Initialize SPI external resource for AT45dbx DataFlash driver. More... | |
void | at45dbx_spi_select_device (uint8_t mem_id) |
Select one external DataFlash component. More... | |
void | at45dbx_spi_deselect_device (uint8_t mem_id) |
Unselect one external DataFlash component. More... | |
void | at45dbx_spi_write_byte (uint8_t data) |
Send one byte to the DataFlash. More... | |
void | at45dbx_spi_read_byte (uint8_t *data) |
Get one byte (read) from the DataFlash. More... | |
void | at45dbx_spi_read_packet (void const *data, size_t len) |
Receive a sequence of bytes from a DataFlash. More... | |
void | at45dbx_spi_write_packet (void const *data, size_t len) |
Send a sequence of bytes to a DataFlash from. More... | |
#define AT45DBX_CS0 AT45DBX_CS |
#define AT45DBX_CS_ID | ( | slot, | |
unused | |||
) | { .id = AT45DBX_CS##slot}, |
#define AT45DBX_DESELECT | ( | slot, | |
unused | |||
) |
Referenced by at45dbx_spi_deselect_device().
#define at45dbx_drv_deselect_device ATPASTE2(driver, _deselect_device) |
#define at45dbx_drv_device ATPASTE2(driver, _device) |
#define at45dbx_drv_read_packet ATPASTE2(driver, _read_packet) |
Referenced by at45dbx_spi_read_byte(), and at45dbx_spi_read_packet().
#define at45dbx_drv_select_device ATPASTE2(driver, _select_device) |
#define at45dbx_drv_setup_device ATPASTE2(driver, _setup_device) |
#define at45dbx_drv_write_packet ATPASTE2(driver, _write_packet) |
Referenced by at45dbx_spi_write_byte(), and at45dbx_spi_write_packet().
#define AT45DBX_SELECT | ( | slot, | |
unused | |||
) |
Referenced by at45dbx_spi_select_device().
|
static |