Updated to the new locm3 changed to stdint types.
This commit is contained in:
@@ -82,4 +82,4 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -52,7 +52,7 @@ static void gpio_setup(void)
|
||||
GPIO3_DIR |= PIN_EN1V8; /* GPIO3[6] on P6_10 as output. */
|
||||
}
|
||||
|
||||
u32 boot0, boot1, boot2, boot3;
|
||||
uint32_t boot0, boot1, boot2, boot3;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ static void gpio_setup(void)
|
||||
GPIO3_DIR |= PIN_EN1V8; /* GPIO3[6] on P6_10 as output. */
|
||||
}
|
||||
|
||||
u32 boot0, boot1, boot2, boot3;
|
||||
uint32_t boot0, boot1, boot2, boot3;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
@@ -62,9 +62,9 @@ static void gpio_setup(void)
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
u8 ssp_val;
|
||||
u8 serial_clock_rate;
|
||||
u8 clock_prescale_rate;
|
||||
uint8_t ssp_val;
|
||||
uint8_t serial_clock_rate;
|
||||
uint8_t clock_prescale_rate;
|
||||
|
||||
gpio_setup();
|
||||
|
||||
@@ -86,7 +86,7 @@ int main(void)
|
||||
|
||||
while (1) {
|
||||
|
||||
ssp_write(SSP1_NUM, (u16)ssp_val);
|
||||
ssp_write(SSP1_NUM, (uint16_t)ssp_val);
|
||||
|
||||
gpio_set(GPIO2, GPIOPIN1); /* LED on */
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#include "../jellybean_conf.h"
|
||||
|
||||
/* Global counter incremented by SysTick Interrupt each millisecond */
|
||||
volatile u32 g_ulSysTickCount;
|
||||
u32 g_NbCyclePerSecond;
|
||||
volatile uint32_t g_ulSysTickCount;
|
||||
uint32_t g_NbCyclePerSecond;
|
||||
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ static void gpio_setup(void)
|
||||
|
||||
static void systick_setup(void)
|
||||
{
|
||||
u32 systick_reload_val;
|
||||
uint32_t systick_reload_val;
|
||||
g_ulSysTickCount = 0;
|
||||
|
||||
/* Disable IRQ globally */
|
||||
@@ -106,15 +106,15 @@ static void scs_dwt_cycle_counter_enabled(void)
|
||||
SCS_DWT_CTRL |= SCS_DWT_CTRL_CYCCNTENA;
|
||||
}
|
||||
|
||||
static u32 sys_tick_get_time_ms(void)
|
||||
static uint32_t sys_tick_get_time_ms(void)
|
||||
{
|
||||
return g_ulSysTickCount;
|
||||
}
|
||||
|
||||
static u32 sys_tick_delta_time_ms(u32 start, u32 end)
|
||||
static uint32_t sys_tick_delta_time_ms(uint32_t start, uint32_t end)
|
||||
{
|
||||
#define MAX_T_U32 ((2^32)-1)
|
||||
u32 diff;
|
||||
uint32_t diff;
|
||||
|
||||
if(end > start)
|
||||
{
|
||||
@@ -127,10 +127,10 @@ static u32 sys_tick_delta_time_ms(u32 start, u32 end)
|
||||
return diff;
|
||||
}
|
||||
|
||||
static void sys_tick_wait_time_ms(u32 wait_ms)
|
||||
static void sys_tick_wait_time_ms(uint32_t wait_ms)
|
||||
{
|
||||
u32 start, end;
|
||||
u32 tickms;
|
||||
uint32_t start, end;
|
||||
uint32_t tickms;
|
||||
|
||||
start = sys_tick_get_time_ms();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user