1.1 --- a/pkg/devices/lib/spi/include/spi.h Mon Nov 13 01:20:09 2023 +0100
1.2 +++ b/pkg/devices/lib/spi/include/spi.h Tue Nov 14 00:02:42 2023 +0100
1.3 @@ -21,8 +21,11 @@
1.4
1.5 #pragma once
1.6
1.7 +
1.8 +
1.9 #ifdef __cplusplus
1.10
1.11 +#include <l4/re/c/dma_space.h>
1.12 #include <stdint.h>
1.13
1.14 /* SPI channel abstractions. */
1.15 @@ -33,10 +36,17 @@
1.16 virtual uint32_t send(uint32_t bytes, const uint8_t data[]) = 0;
1.17
1.18 virtual uint32_t send_dc(uint32_t bytes, const uint8_t data[],
1.19 - const int dc[]) = 0;
1.20 + const int dc[], uint8_t char_size,
1.21 + bool big_endian) = 0;
1.22
1.23 virtual uint32_t send_units(uint32_t bytes, const uint8_t data[],
1.24 - uint8_t unit_size, uint8_t char_size) = 0;
1.25 + uint8_t unit_size, uint8_t char_size,
1.26 + bool big_endian) = 0;
1.27 +
1.28 + virtual uint32_t transfer(l4_addr_t vaddr, l4re_dma_space_dma_addr_t paddr,
1.29 + uint32_t count, uint8_t unit_size, uint8_t char_size,
1.30 + l4_addr_t desc_vaddr = 0,
1.31 + l4re_dma_space_dma_addr_t desc_paddr = 0) = 0;
1.32 };
1.33
1.34 class Spi_control_base