projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stmf0: Add casts to reduce -Wconversion warnings. Use AO_TICK_TYPE
[fw/altos]
/
src
/
stmf0
/
ao_arch_funcs.h
diff --git
a/src/stmf0/ao_arch_funcs.h
b/src/stmf0/ao_arch_funcs.h
index d46899d575c409f149fd7e50767debb0422f24d1..8a173b57e5be79e928bebb5acf6ffb0bc1fa3d72 100644
(file)
--- a/
src/stmf0/ao_arch_funcs.h
+++ b/
src/stmf0/ao_arch_funcs.h
@@
-151,7
+151,7
@@
ao_spi_recv_byte(uint8_t spi_index)
stm_spi->dr = 0xff;
while (!(stm_spi->sr & (1 << STM_SPI_SR_RXNE)))
;
stm_spi->dr = 0xff;
while (!(stm_spi->sr & (1 << STM_SPI_SR_RXNE)))
;
- return stm_spi->dr;
+ return
(uint8_t)
stm_spi->dr;
}
void
}
void
@@
-215,16
+215,16
@@
static inline void ao_enable_port(struct stm_gpio *port)
static inline void ao_disable_port(struct stm_gpio *port)
{
if ((port) == &stm_gpioa) {
static inline void ao_disable_port(struct stm_gpio *port)
{
if ((port) == &stm_gpioa) {
- stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPAEN);
+ stm_rcc.ahbenr &= ~(1
UL
<< STM_RCC_AHBENR_IOPAEN);
ao_power_unregister(&ao_power_gpioa);
} else if ((port) == &stm_gpiob) {
ao_power_unregister(&ao_power_gpioa);
} else if ((port) == &stm_gpiob) {
- stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPBEN);
+ stm_rcc.ahbenr &= ~(1
UL
<< STM_RCC_AHBENR_IOPBEN);
ao_power_unregister(&ao_power_gpiob);
} else if ((port) == &stm_gpioc) {
ao_power_unregister(&ao_power_gpiob);
} else if ((port) == &stm_gpioc) {
- stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPCEN);
+ stm_rcc.ahbenr &= ~(1
UL
<< STM_RCC_AHBENR_IOPCEN);
ao_power_unregister(&ao_power_gpioc);
} else if ((port) == &stm_gpiof) {
ao_power_unregister(&ao_power_gpioc);
} else if ((port) == &stm_gpiof) {
- stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPFEN);
+ stm_rcc.ahbenr &= ~(1
UL
<< STM_RCC_AHBENR_IOPFEN);
ao_power_unregister(&ao_power_gpiof);
}
}
ao_power_unregister(&ao_power_gpiof);
}
}