mbedtls: merge changes from C3

This commit is contained in:
Marius Vikhammer
2020-12-22 19:37:59 +08:00
parent c3ba995f2c
commit 1b6891c5d8
16 changed files with 652 additions and 115 deletions

View File

@@ -44,6 +44,15 @@ extern "C" {
#define GDMA_LL_TRIG_SRC_SHA (7)
#define GDMA_LL_TRIG_SRC_ADC_DAC (8)
typedef enum {
GDMA_LL_PERIPH_ID_SPI2 = 0,
GDMA_LL_PERIPH_ID_UART = 2,
GDMA_LL_PERIPH_ID_I2S0 = 3,
GDMA_LL_PERIPH_ID_AES = 6,
GDMA_LL_PERIPH_ID_SHA = 7,
GDMA_LL_PERIPH_ID_ADC_DAC = 8,
} gdma_ll_periph_id_t;
///////////////////////////////////// Common /////////////////////////////////////////
/**
* @brief Enable DMA channel M2M mode (TX channel n forward data to RX channel n), disabled by default
@@ -247,7 +256,7 @@ static inline void gdma_ll_rx_set_priority(gdma_dev_t *dev, uint32_t channel, ui
/**
* @brief Connect DMA RX channel to a given peripheral
*/
static inline void gdma_ll_rx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, uint32_t periph_id)
static inline void gdma_ll_rx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, gdma_ll_periph_id_t periph_id)
{
dev->channel[channel].in.in_peri_sel.sel = periph_id;
}
@@ -405,7 +414,7 @@ static inline void gdma_ll_tx_set_priority(gdma_dev_t *dev, uint32_t channel, ui
/**
* @brief Connect DMA TX channel to a given peripheral
*/
static inline void gdma_ll_tx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, uint32_t periph_id)
static inline void gdma_ll_tx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, gdma_ll_periph_id_t periph_id)
{
dev->channel[channel].out.out_peri_sel.sel = periph_id;
}