diff options
Diffstat (limited to 'chip/stm32')
-rw-r--r-- | chip/stm32/dma-stm32f4.c | 11 | ||||
-rw-r--r-- | chip/stm32/pwm.c | 2 | ||||
-rw-r--r-- | chip/stm32/registers-stm32f0.h | 12 | ||||
-rw-r--r-- | chip/stm32/registers-stm32f3.h | 12 | ||||
-rw-r--r-- | chip/stm32/registers-stm32f4.h | 12 | ||||
-rw-r--r-- | chip/stm32/registers-stm32f7.h | 12 | ||||
-rw-r--r-- | chip/stm32/registers-stm32g4.h | 2 | ||||
-rw-r--r-- | chip/stm32/registers-stm32l.h | 12 | ||||
-rw-r--r-- | chip/stm32/registers.h | 34 |
9 files changed, 55 insertions, 54 deletions
diff --git a/chip/stm32/dma-stm32f4.c b/chip/stm32/dma-stm32f4.c index 3121089437..15fb0f28ef 100644 --- a/chip/stm32/dma-stm32f4.c +++ b/chip/stm32/dma-stm32f4.c @@ -90,8 +90,8 @@ void dma_disable_all(void) * @param memory Pointer to memory address for receive/transmit * @param flags DMA flags for the control register. */ -static void prepare_stream(enum dma_channel stream, unsigned count, - void *periph, void *memory, unsigned flags) +static void prepare_stream(enum dma_channel stream, unsigned int count, + void *periph, void *memory, unsigned int flags) { stm32_dma_stream_t *dma_stream = dma_get_channel(stream); uint32_t ccr = STM32_DMA_CCR_PL_VERY_HIGH; @@ -120,7 +120,7 @@ void dma_go(stm32_dma_stream_t *stream) stream->scr |= STM32_DMA_CCR_EN; } -void dma_prepare_tx(const struct dma_option *option, unsigned count, +void dma_prepare_tx(const struct dma_option *option, unsigned int count, const void *memory) { /* @@ -132,7 +132,8 @@ void dma_prepare_tx(const struct dma_option *option, unsigned count, option->flags); } -void dma_start_rx(const struct dma_option *option, unsigned count, void *memory) +void dma_start_rx(const struct dma_option *option, unsigned int count, + void *memory) { stm32_dma_stream_t *stream = dma_get_channel(option->channel); @@ -203,7 +204,7 @@ void dma_test(enum dma_channel stream) stm32_dma_stream_t *dma_stream = dma_get_channel(stream); uint32_t ctrl; char periph[32], memory[32]; - unsigned count = sizeof(periph); + unsigned int count = sizeof(periph); int i; memset(memory, '\0', sizeof(memory)); diff --git a/chip/stm32/pwm.c b/chip/stm32/pwm.c index a9f266cbe0..bf32793c64 100644 --- a/chip/stm32/pwm.c +++ b/chip/stm32/pwm.c @@ -40,7 +40,7 @@ static void pwm_configure(enum pwm_channel ch) { const struct pwm_t *pwm = pwm_channels + ch; timer_ctlr_t *tim = (timer_ctlr_t *)(pwm->tim.base); - volatile unsigned *ccmr = NULL; + volatile unsigned int *ccmr = NULL; /* Default frequency = 100 Hz */ int frequency = pwm->frequency ? pwm->frequency : 100; uint16_t ccer; diff --git a/chip/stm32/registers-stm32f0.h b/chip/stm32/registers-stm32f0.h index 645ed5048e..6d1907e48a 100644 --- a/chip/stm32/registers-stm32f0.h +++ b/chip/stm32/registers-stm32f0.h @@ -428,15 +428,15 @@ struct stm32_spi_regs { uint16_t _pad0; uint16_t cr2; uint16_t _pad1; - unsigned sr; + unsigned int sr; uint8_t dr; uint8_t _pad2; uint16_t _pad3; - unsigned crcpr; - unsigned rxcrcr; - unsigned txcrcr; - unsigned i2scfgr; /* STM32L only */ - unsigned i2spr; /* STM32L only */ + unsigned int crcpr; + unsigned int rxcrcr; + unsigned int txcrcr; + unsigned int i2scfgr; /* STM32L only */ + unsigned int i2spr; /* STM32L only */ }; /* Must be volatile, or compiler optimizes out repeated accesses */ typedef volatile struct stm32_spi_regs stm32_spi_regs_t; diff --git a/chip/stm32/registers-stm32f3.h b/chip/stm32/registers-stm32f3.h index e88f5f7d52..82880accdc 100644 --- a/chip/stm32/registers-stm32f3.h +++ b/chip/stm32/registers-stm32f3.h @@ -489,15 +489,15 @@ struct stm32_spi_regs { uint16_t _pad0; uint16_t cr2; uint16_t _pad1; - unsigned sr; + unsigned int sr; uint8_t dr; uint8_t _pad2; uint16_t _pad3; - unsigned crcpr; - unsigned rxcrcr; - unsigned txcrcr; - unsigned i2scfgr; /* STM32L only */ - unsigned i2spr; /* STM32L only */ + unsigned int crcpr; + unsigned int rxcrcr; + unsigned int txcrcr; + unsigned int i2scfgr; /* STM32L only */ + unsigned int i2spr; /* STM32L only */ }; /* Must be volatile, or compiler optimizes out repeated accesses */ typedef volatile struct stm32_spi_regs stm32_spi_regs_t; diff --git a/chip/stm32/registers-stm32f4.h b/chip/stm32/registers-stm32f4.h index a415b80d5c..5db9b5b9e6 100644 --- a/chip/stm32/registers-stm32f4.h +++ b/chip/stm32/registers-stm32f4.h @@ -656,15 +656,15 @@ struct stm32_spi_regs { uint16_t _pad0; uint16_t cr2; uint16_t _pad1; - unsigned sr; + unsigned int sr; uint8_t dr; uint8_t _pad2; uint16_t _pad3; - unsigned crcpr; - unsigned rxcrcr; - unsigned txcrcr; - unsigned i2scfgr; /* STM32L only */ - unsigned i2spr; /* STM32L only */ + unsigned int crcpr; + unsigned int rxcrcr; + unsigned int txcrcr; + unsigned int i2scfgr; /* STM32L only */ + unsigned int i2spr; /* STM32L only */ }; /* Must be volatile, or compiler optimizes out repeated accesses */ typedef volatile struct stm32_spi_regs stm32_spi_regs_t; diff --git a/chip/stm32/registers-stm32f7.h b/chip/stm32/registers-stm32f7.h index a597cbfe68..37c89bbe07 100644 --- a/chip/stm32/registers-stm32f7.h +++ b/chip/stm32/registers-stm32f7.h @@ -587,15 +587,15 @@ struct stm32_spi_regs { uint16_t _pad0; uint16_t cr2; uint16_t _pad1; - unsigned sr; + unsigned int sr; uint8_t dr; uint8_t _pad2; uint16_t _pad3; - unsigned crcpr; - unsigned rxcrcr; - unsigned txcrcr; - unsigned i2scfgr; /* STM32L only */ - unsigned i2spr; /* STM32L only */ + unsigned int crcpr; + unsigned int rxcrcr; + unsigned int txcrcr; + unsigned int i2scfgr; /* STM32L only */ + unsigned int i2spr; /* STM32L only */ }; /* Must be volatile, or compiler optimizes out repeated accesses */ typedef volatile struct stm32_spi_regs stm32_spi_regs_t; diff --git a/chip/stm32/registers-stm32g4.h b/chip/stm32/registers-stm32g4.h index 4610bb1e98..a19aa942b0 100644 --- a/chip/stm32/registers-stm32g4.h +++ b/chip/stm32/registers-stm32g4.h @@ -833,7 +833,7 @@ struct stm32_spi_regs { uint16_t _pad0; uint16_t cr2; uint16_t _pad1; - unsigned sr; + unsigned int sr; uint8_t dr; uint8_t _pad2; uint16_t _pad3; diff --git a/chip/stm32/registers-stm32l.h b/chip/stm32/registers-stm32l.h index 07ead4411a..57302a9d8d 100644 --- a/chip/stm32/registers-stm32l.h +++ b/chip/stm32/registers-stm32l.h @@ -416,15 +416,15 @@ struct stm32_spi_regs { uint16_t _pad0; uint16_t cr2; uint16_t _pad1; - unsigned sr; + unsigned int sr; uint8_t dr; uint8_t _pad2; uint16_t _pad3; - unsigned crcpr; - unsigned rxcrcr; - unsigned txcrcr; - unsigned i2scfgr; /* STM32L only */ - unsigned i2spr; /* STM32L only */ + unsigned int crcpr; + unsigned int rxcrcr; + unsigned int txcrcr; + unsigned int i2scfgr; /* STM32L only */ + unsigned int i2spr; /* STM32L only */ }; /* Must be volatile, or compiler optimizes out repeated accesses */ typedef volatile struct stm32_spi_regs stm32_spi_regs_t; diff --git a/chip/stm32/registers.h b/chip/stm32/registers.h index 2ec0ff28fc..c4441315af 100644 --- a/chip/stm32/registers.h +++ b/chip/stm32/registers.h @@ -113,28 +113,28 @@ #define STM32_TIM32_CCR4(n) STM32_TIM_REG32(n, 0x40) /* Timer registers as struct */ struct timer_ctlr { - unsigned cr1; - unsigned cr2; - unsigned smcr; - unsigned dier; + unsigned int cr1; + unsigned int cr2; + unsigned int smcr; + unsigned int dier; - unsigned sr; - unsigned egr; - unsigned ccmr1; - unsigned ccmr2; + unsigned int sr; + unsigned int egr; + unsigned int ccmr1; + unsigned int ccmr2; - unsigned ccer; - unsigned cnt; - unsigned psc; - unsigned arr; + unsigned int ccer; + unsigned int cnt; + unsigned int psc; + unsigned int arr; - unsigned ccr[5]; /* ccr[0] = reserved30 */ + unsigned int ccr[5]; /* ccr[0] = reserved30 */ - unsigned bdtr; - unsigned dcr; - unsigned dmar; + unsigned int bdtr; + unsigned int dcr; + unsigned int dmar; - unsigned option_register; + unsigned int option_register; }; /* Must be volatile, or compiler optimizes out repeated accesses */ typedef volatile struct timer_ctlr timer_ctlr_t; |