Landfall

Change of pkg/devices/lib/spi/include/spi-gpio.h

236:779f8f6a9587
pkg/devices/lib/spi/include/spi-gpio.h cpm-library-improvements
     1.1 --- a/pkg/devices/lib/spi/include/spi-gpio.h	Mon Nov 13 01:20:09 2023 +0100
     1.2 +++ b/pkg/devices/lib/spi/include/spi-gpio.h	Tue Nov 14 00:02:42 2023 +0100
     1.3 @@ -21,6 +21,7 @@
     1.4  
     1.5  #pragma once
     1.6  
     1.7 +#include <l4/re/c/dma_space.h>
     1.8  #include <stdint.h>
     1.9  
    1.10  
    1.11 @@ -58,10 +59,16 @@
    1.12  
    1.13    uint32_t send(uint32_t bytes, const uint8_t data[]);
    1.14  
    1.15 -  uint32_t send_dc(uint32_t bytes, const uint8_t data[], const int dc[]);
    1.16 +  uint32_t send_dc(uint32_t bytes, const uint8_t data[], const int dc[],
    1.17 +                   uint8_t char_size, bool big_endian);
    1.18  
    1.19    uint32_t send_units(uint32_t bytes, const uint8_t data[], uint8_t unit_size,
    1.20 -                      uint8_t char_size);
    1.21 +                      uint8_t char_size, bool big_endian);
    1.22 +
    1.23 +  uint32_t transfer(l4_addr_t vaddr, l4re_dma_space_dma_addr_t paddr,
    1.24 +                    uint32_t count, uint8_t unit_size, uint8_t char_size,
    1.25 +                    l4_addr_t desc_vaddr = 0,
    1.26 +                    l4re_dma_space_dma_addr_t desc_paddr = 0);
    1.27  };
    1.28  
    1.29  #endif /* __cplusplus */
    1.30 @@ -81,9 +88,20 @@
    1.31  uint32_t spi_gpio_send(void *channel, uint32_t bytes, const uint8_t data[]);
    1.32  
    1.33  uint32_t spi_gpio_send_dc(void *channel, uint32_t bytes, const uint8_t data[],
    1.34 -                          const int dc[]);
    1.35 +                          const int dc[], uint8_t char_size, int big_endian);
    1.36  
    1.37  uint32_t spi_gpio_send_units(void *channel, uint32_t bytes, const uint8_t data[],
    1.38 -                             uint8_t unit_size, uint8_t char_size);
    1.39 +                             uint8_t unit_size, uint8_t char_size, int big_endian);
    1.40 +
    1.41 +uint32_t spi_gpio_transfer(void *channel, l4_addr_t vaddr,
    1.42 +                           l4re_dma_space_dma_addr_t paddr,
    1.43 +                           uint32_t count, uint8_t unit_size,
    1.44 +                           uint8_t char_size);
    1.45 +
    1.46 +uint32_t spi_gpio_transfer_descriptor(void *channel, l4_addr_t vaddr,
    1.47 +                                      l4re_dma_space_dma_addr_t paddr,
    1.48 +                                      uint32_t count, uint8_t unit_size,
    1.49 +                                      uint8_t char_size, l4_addr_t desc_vaddr,
    1.50 +                                      l4re_dma_space_dma_addr_t desc_paddr);
    1.51  
    1.52  EXTERN_C_END