mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
Merge pull request #55 from smartavionics/mb-misc-mods
Cast around warnings in stm32_enc_init() and stm32_enc_set_counter().
This commit is contained in:
commit
54e7607042
@ -1195,7 +1195,7 @@ int platform_can_recv( unsigned id, u32 *canid, u8 *idtype, u8 *len, u8 *data )
|
||||
|
||||
void stm32_enc_init( unsigned id )
|
||||
{
|
||||
TIM_TypeDef *ptimer = timer[ id ];
|
||||
TIM_TypeDef *ptimer = (TIM_TypeDef *)timer[ id ];
|
||||
|
||||
TIM_Cmd( ptimer, DISABLE );
|
||||
TIM_DeInit( ptimer );
|
||||
@ -1206,7 +1206,7 @@ void stm32_enc_init( unsigned id )
|
||||
|
||||
void stm32_enc_set_counter( unsigned id, unsigned count )
|
||||
{
|
||||
TIM_TypeDef *ptimer = timer[ id ];
|
||||
TIM_TypeDef *ptimer = (TIM_TypeDef *)timer[ id ];
|
||||
|
||||
TIM_SetCounter( ptimer, ( u16 )count );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user