Landfall

Change of pkg/devices/lib/aic/include/aic-x1600.h

220:edb87791dfa7
pkg/devices/lib/aic/include/aic-x1600.h cpm-library-improvements
     1.1 --- a/pkg/devices/lib/aic/include/aic-x1600.h	Fri Nov 03 18:09:49 2023 +0100
     1.2 +++ b/pkg/devices/lib/aic/include/aic-x1600.h	Fri Nov 03 19:58:11 2023 +0100
     1.3 @@ -33,7 +33,7 @@
     1.4  #include <l4/devices/dma-x1600.h>
     1.5  #include <l4/devices/hw_mmio_register_block.h>
     1.6  
     1.7 -// AIC channel.
     1.8 +/* AIC channel. */
     1.9  
    1.10  class Aic_x1600_channel
    1.11  {
    1.12 @@ -44,7 +44,7 @@
    1.13    Cpm_x1600_chip *_cpm;
    1.14    Dma_x1600_channel *_dma;
    1.15  
    1.16 -  // Buffer management.
    1.17 +  /* Buffer management. */
    1.18  
    1.19    unsigned int _size = 0;
    1.20    l4_addr_t _vaddr = 0;
    1.21 @@ -52,14 +52,14 @@
    1.22    l4_cap_idx_t _mem = L4_INVALID_CAP;
    1.23  
    1.24  public:
    1.25 -  Aic_x1600_channel(l4_addr_t aic_start, l4_addr_t start,
    1.26 -                    enum Clock_identifiers clock_rx,
    1.27 -                    enum Clock_identifiers clock_tx,
    1.28 -                    Cpm_x1600_chip *cpm,
    1.29 -                    Dma_x1600_channel *dma);
    1.30 +  explicit Aic_x1600_channel(l4_addr_t aic_start, l4_addr_t start,
    1.31 +                             enum Clock_identifiers clock_rx,
    1.32 +                             enum Clock_identifiers clock_tx,
    1.33 +                             Cpm_x1600_chip *cpm,
    1.34 +                             Dma_x1600_channel *dma);
    1.35  
    1.36    long get_buffer(uint32_t count, l4_addr_t *addr);
    1.37 -  unsigned int transfer(uint32_t count, uint32_t sample_rate, uint8_t sample_size);
    1.38 +  uint32_t transfer(uint32_t count, uint32_t sample_rate, uint8_t sample_size);
    1.39  
    1.40  private:
    1.41    void disable();
    1.42 @@ -73,7 +73,7 @@
    1.43    void set_trans_frequency(uint32_t sample_rate);
    1.44  };
    1.45  
    1.46 -// AIC device control.
    1.47 +/* AIC device control. */
    1.48  
    1.49  class Aic_x1600_chip
    1.50  {
    1.51 @@ -82,7 +82,8 @@
    1.52    Cpm_x1600_chip *_cpm;
    1.53  
    1.54  public:
    1.55 -  Aic_x1600_chip(l4_addr_t aic_start, l4_addr_t start, l4_addr_t end, Cpm_x1600_chip *cpm);
    1.56 +  explicit Aic_x1600_chip(l4_addr_t aic_start, l4_addr_t start, l4_addr_t end,
    1.57 +                          Cpm_x1600_chip *cpm);
    1.58  
    1.59    Aic_x1600_channel *get_channel(uint8_t channel, Dma_x1600_channel *dma);
    1.60  };
    1.61 @@ -101,6 +102,6 @@
    1.62  
    1.63  long x1600_aic_get_buffer(void *channel, uint32_t count, l4_addr_t *addr);
    1.64  
    1.65 -unsigned int x1600_aic_transfer(void *channel, uint32_t count, uint32_t sample_rate, uint8_t sample_size);
    1.66 +uint32_t x1600_aic_transfer(void *channel, uint32_t count, uint32_t sample_rate, uint8_t sample_size);
    1.67  
    1.68  EXTERN_C_END