mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
Rename mg_tcpip_spi to mg_spi and move it to flash.h
This commit is contained in:
1 parent
1d8c55c892
commit
e7bfbf99fa
23 files changed
+104
-106
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "arch.h"
|
||||
|
||||
// SPI bus abstraction for SPI-attached chips, e.g. W5500.
|
||||
// Network drivers get it via the driver_data field
|
||||
struct mg_spi {
|
||||
void *spi; // Opaque SPI bus handle passed to all callbacks
|
||||
void (*begin)(void *); // Assert chip-select, start of transaction
|
||||
void (*end)(void *); // Deassert chip-select, end of transaction
|
||||
void (*txn)(void *, uint8_t *write, uint8_t *read, size_t); // Full duplex
|
||||
};
|
||||
|
||||
// SPI bus for SPI-attached network chips, defined by the application.
|
||||
// Used by the drivers' INIT macros, e.g. MG_TCPIP_DRIVER_W5500_INIT
|
||||
extern struct mg_spi mg_spi;
|
||||
Reference in new issue
Block a user