Changed to use stdint types.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#error "invalid/unknown stm32 family for this code"
|
||||
#endif
|
||||
|
||||
void exti_set_trigger(u32 extis, exti_trigger_type trig)
|
||||
void exti_set_trigger(uint32_t extis, exti_trigger_type trig)
|
||||
{
|
||||
switch (trig) {
|
||||
case EXTI_TRIGGER_RISING:
|
||||
@@ -51,7 +51,7 @@ void exti_set_trigger(u32 extis, exti_trigger_type trig)
|
||||
}
|
||||
}
|
||||
|
||||
void exti_enable_request(u32 extis)
|
||||
void exti_enable_request(uint32_t extis)
|
||||
{
|
||||
/* Enable interrupts. */
|
||||
EXTI_IMR |= extis;
|
||||
@@ -60,7 +60,7 @@ void exti_enable_request(u32 extis)
|
||||
EXTI_EMR |= extis;
|
||||
}
|
||||
|
||||
void exti_disable_request(u32 extis)
|
||||
void exti_disable_request(uint32_t extis)
|
||||
{
|
||||
/* Disable interrupts. */
|
||||
EXTI_IMR &= ~extis;
|
||||
@@ -73,7 +73,7 @@ void exti_disable_request(u32 extis)
|
||||
* Reset the interrupt request by writing a 1 to the corresponding
|
||||
* pending bit register.
|
||||
*/
|
||||
void exti_reset_request(u32 extis)
|
||||
void exti_reset_request(uint32_t extis)
|
||||
{
|
||||
EXTI_PR = extis;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ void exti_reset_request(u32 extis)
|
||||
/*
|
||||
* Check the flag of a given EXTI interrupt.
|
||||
* */
|
||||
u32 exti_get_flag_status(u32 exti)
|
||||
uint32_t exti_get_flag_status(uint32_t exti)
|
||||
{
|
||||
return EXTI_PR & exti;
|
||||
}
|
||||
@@ -92,9 +92,9 @@ u32 exti_get_flag_status(u32 exti)
|
||||
*
|
||||
* TODO: This could be rewritten in fewer lines of code.
|
||||
*/
|
||||
void exti_select_source(u32 exti, u32 gpioport)
|
||||
void exti_select_source(uint32_t exti, uint32_t gpioport)
|
||||
{
|
||||
u8 shift, bits;
|
||||
uint8_t shift, bits;
|
||||
|
||||
shift = bits = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user