mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-10-01 01:45:38 -04:00
temp commit: Expose write functions to make development easier
This commit is contained in:
parent
534ac06e86
commit
0bec032db3
@ -270,7 +270,7 @@ tb:
|
|||||||
# builds.
|
# builds.
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
YOSYS_FLAG ?=
|
YOSYS_FLAG ?=-DINCLUDE_SPI_MASTER
|
||||||
|
|
||||||
synth.json: $(FPGA_SRC) $(VERILOG_SRCS) bram_fw.hex $(P)/data/uds.hex $(P)/data/udi.hex
|
synth.json: $(FPGA_SRC) $(VERILOG_SRCS) bram_fw.hex $(P)/data/uds.hex $(P)/data/udi.hex
|
||||||
$(YOSYS_PATH)yosys -v3 -l synth.log $(YOSYS_FLAG) -DBRAM_FW_SIZE=$(BRAM_FW_SIZE) \
|
$(YOSYS_PATH)yosys -v3 -l synth.log $(YOSYS_FLAG) -DBRAM_FW_SIZE=$(BRAM_FW_SIZE) \
|
||||||
|
@ -23,7 +23,6 @@ static volatile uint32_t *tx = (volatile uint32_t *)TK1_MMIO_UART_TX_DATA;
|
|||||||
static uint8_t genhdr(uint8_t id, uint8_t endpoint, uint8_t status,
|
static uint8_t genhdr(uint8_t id, uint8_t endpoint, uint8_t status,
|
||||||
enum cmdlen len);
|
enum cmdlen len);
|
||||||
static int parseframe(uint8_t b, struct frame_header *hdr);
|
static int parseframe(uint8_t b, struct frame_header *hdr);
|
||||||
static void write(uint8_t *buf, size_t nbytes);
|
|
||||||
static int read(uint8_t *buf, size_t bufsize, size_t nbytes);
|
static int read(uint8_t *buf, size_t bufsize, size_t nbytes);
|
||||||
static int bytelen(enum cmdlen cmdlen);
|
static int bytelen(enum cmdlen cmdlen);
|
||||||
|
|
||||||
@ -141,7 +140,7 @@ void writebyte(uint8_t b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void write(uint8_t *buf, size_t nbytes)
|
void write(uint8_t *buf, size_t nbytes)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < nbytes; i++) {
|
for (int i = 0; i < nbytes; i++) {
|
||||||
writebyte(buf[i]);
|
writebyte(buf[i]);
|
||||||
|
@ -58,4 +58,5 @@ void writebyte(uint8_t b);
|
|||||||
uint8_t readbyte(void);
|
uint8_t readbyte(void);
|
||||||
void fwreply(struct frame_header hdr, enum fwcmd rspcode, uint8_t *buf);
|
void fwreply(struct frame_header hdr, enum fwcmd rspcode, uint8_t *buf);
|
||||||
int readcommand(struct frame_header *hdr, uint8_t *cmd, int state);
|
int readcommand(struct frame_header *hdr, uint8_t *cmd, int state);
|
||||||
|
void write(uint8_t *buf, size_t nbytes);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user