mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-11-25 01:53:21 -05:00
PoC: Integrate spi and flash code
This commit is contained in:
parent
12c23cc149
commit
cbc7adf706
6 changed files with 11 additions and 12 deletions
|
|
@ -2,11 +2,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "spi.h"
|
||||
#include "../tk1/types.h"
|
||||
#include "../tk1_mem.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// clang-format off
|
||||
static volatile uint32_t *spi_en = (volatile uint32_t *)(TK1_MMIO_TK1_BASE | 0x200);
|
||||
static volatile uint32_t *spi_xfer = (volatile uint32_t *)(TK1_MMIO_TK1_BASE | 0x204);
|
||||
|
|
@ -64,7 +62,6 @@ static void _spi_read(uint8_t *buf, size_t size)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Function to both read and write data to the connected SPI flash.
|
||||
int spi_transfer(uint8_t *cmd, size_t cmd_size, uint8_t *tx_buf, size_t tx_size,
|
||||
uint8_t *rx_buf, size_t rx_size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue