forked from Imagelibrary/rtems
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
* clock/ckinit.c, clock/rtc.c, include/bsp.h, startup/bspstart.c, timer/timer.c: Convert to using c99 fixed size types.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* clock/ckinit.c, clock/rtc.c, include/bsp.h, startup/bspstart.c,
|
||||
timer/timer.c: Convert to using c99 fixed size types.
|
||||
|
||||
2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect changes to bsp.am.
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
|
||||
static rtems_unsigned32 Clock_initial_isr_value;
|
||||
uint32_t Clock_isrs; /* ISRs until next tick */
|
||||
static uint32_t Clock_initial_isr_value;
|
||||
|
||||
volatile rtems_unsigned32 Clock_driver_ticks;
|
||||
volatile uint32_t Clock_driver_ticks;
|
||||
|
||||
void Clock_exit( void );
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
| Arguments: i - Number to convert.
|
||||
| Returns: BCD representation of number.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline rtems_unsigned8
|
||||
bcd(rtems_unsigned8 i)
|
||||
static inline uint8_t
|
||||
bcd(uint8_t i)
|
||||
{
|
||||
return ((i / 16) * 10 + (i % 16));
|
||||
} /* bcd */
|
||||
@@ -101,8 +101,8 @@ bcd(rtems_unsigned8 i)
|
||||
| Arguments: y - year to convert (1970 <= y <= 2100).
|
||||
| Returns: number of seconds since 1970.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline rtems_unsigned32
|
||||
ytos(rtems_unsigned16 y)
|
||||
static inline uint32_t
|
||||
ytos(uint16_t y)
|
||||
{ /* v NUM LEAP YEARS v */
|
||||
return ((y - 1970) * SECS_PER_REG_YEAR + (y - 1970 + 1) / 4 * SECS_PER_DAY);
|
||||
} /* ytos */
|
||||
@@ -115,10 +115,10 @@ ytos(rtems_unsigned16 y)
|
||||
| Arguments: m - month to convert, leap - is this a month of a leap year.
|
||||
| Returns: number of seconds since January.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline rtems_unsigned32
|
||||
mtos(rtems_unsigned8 m, rtems_boolean leap)
|
||||
static inline uint32_t
|
||||
mtos(uint8_t m, rtems_boolean leap)
|
||||
{
|
||||
static rtems_unsigned16 daysMonth[] = { 0, 0, 31, 59, 90, 120, 151, 181,
|
||||
static uint16_t daysMonth[] = { 0, 0, 31, 59, 90, 120, 151, 181,
|
||||
212, 243, 273, 304, 334, 365 };
|
||||
/* Days since beginning of year until beginning of month. */
|
||||
|
||||
@@ -134,10 +134,10 @@ mtos(rtems_unsigned8 m, rtems_boolean leap)
|
||||
| Arguments: what - what to write to RTC port (what to do).
|
||||
| Returns: result received from RTC port after action performed.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline rtems_unsigned8
|
||||
rtcin(rtems_unsigned8 what)
|
||||
static inline uint8_t
|
||||
rtcin(uint8_t what)
|
||||
{
|
||||
rtems_unsigned8 r;
|
||||
uint8_t r;
|
||||
|
||||
outport_byte(IO_RTC, what);
|
||||
inport_byte (IO_RTC+1, r);
|
||||
@@ -158,7 +158,7 @@ rtcin(rtems_unsigned8 what)
|
||||
void
|
||||
init_rtc(void)
|
||||
{
|
||||
rtems_unsigned8 s;
|
||||
uint8_t s;
|
||||
|
||||
/* initialize brain-dead battery powered clock */
|
||||
outport_byte(IO_RTC, RTC_STATUSA);
|
||||
@@ -186,8 +186,8 @@ init_rtc(void)
|
||||
long int
|
||||
rtc_read(rtems_time_of_day *tod)
|
||||
{
|
||||
rtems_unsigned8 sa;
|
||||
rtems_unsigned32 sec = 0;
|
||||
uint8_t sa;
|
||||
uint32_t sec = 0;
|
||||
|
||||
memset(tod, 0, sizeof *tod); /* zero tod structure */
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ extern void Wait_X_ms (unsigned);
|
||||
|
||||
#define rtems_bsp_delay( _microseconds ) \
|
||||
{ \
|
||||
rtems_unsigned32 _counter; \
|
||||
uint32_t _counter; \
|
||||
\
|
||||
_counter = (_microseconds); \
|
||||
\
|
||||
|
||||
@@ -40,14 +40,14 @@ rtems_cpu_table Cpu_table;
|
||||
* Tells us where to put the workspace in case remote debugger is present.
|
||||
*/
|
||||
|
||||
extern rtems_unsigned32 rdb_start;
|
||||
extern uint32_t rdb_start;
|
||||
|
||||
/*
|
||||
* Use the shared implementations of the following routines
|
||||
*/
|
||||
|
||||
void bsp_postdriver_hook(void);
|
||||
void bsp_libc_init( void *, unsigned32, int );
|
||||
void bsp_libc_init( void *, uint32_t, int );
|
||||
|
||||
/*
|
||||
* Function: bsp_pretasking_hook
|
||||
@@ -66,10 +66,10 @@ void bsp_libc_init( void *, unsigned32, int );
|
||||
void bsp_pretasking_hook(void)
|
||||
{
|
||||
extern int heap_bottom;
|
||||
rtems_unsigned32 heap_start;
|
||||
rtems_unsigned32 heap_size;
|
||||
uint32_t heap_start;
|
||||
uint32_t heap_size;
|
||||
|
||||
heap_start = (rtems_unsigned32) &heap_bottom;
|
||||
heap_start = (uint32_t) &heap_bottom;
|
||||
if (heap_start & (CPU_ALIGNMENT-1))
|
||||
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <bsp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
volatile rtems_unsigned32 Ttimer_val; /* Updated from ISR!!! */
|
||||
volatile uint32_t Ttimer_val; /* Updated from ISR!!! */
|
||||
rtems_boolean Timer_driver_Find_average_overhead;
|
||||
|
||||
extern void timerisr();
|
||||
@@ -137,8 +137,8 @@ void Timer_initialize(void)
|
||||
|
||||
int Read_timer(void)
|
||||
{
|
||||
register rtems_unsigned32 clicks, total;
|
||||
register rtems_unsigned8 lsb, msb;
|
||||
register uint32_t clicks, total;
|
||||
register uint8_t lsb, msb;
|
||||
|
||||
/* latch the count */
|
||||
outport_byte (TIMER_MODE, TIMER_SEL0|TIMER_LATCH );
|
||||
|
||||
Reference in New Issue
Block a user