Changeset b7044dc in rtems for c/src/lib/libbsp/m68k


Ignore:
Timestamp:
Mar 31, 2004, 4:40:43 AM (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f3238bb3
Parents:
6cfc0a4
Message:

2004-03-31 Ralf Corsepius <ralf_corsepius@…>

  • console/console.c, i2c/i2c.c, i2c/i2cdrv.c, include/bsp.h, include/i2c.h, nvram/nvram.c, startup/bspstart.c, startup/init5206e.c, tod/ds1307.c: Convert to using c99 fixed size types.
Location:
c/src/lib/libbsp/m68k/mcf5206elite
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mcf5206elite/ChangeLog

    r6cfc0a4 rb7044dc  
     12004-03-31      Ralf Corsepius <ralf_corsepius@rtems.org>
     2
     3        * console/console.c, i2c/i2c.c, i2c/i2cdrv.c, include/bsp.h,
     4        include/i2c.h, nvram/nvram.c, startup/bspstart.c,
     5        startup/init5206e.c, tod/ds1307.c: Convert to using c99 fixed size
     6        types.
     7
    182004-02-19      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    29
  • c/src/lib/libbsp/m68k/mcf5206elite/console/console.c

    r6cfc0a4 rb7044dc  
    154154    rtems_libio_open_close_args_t *args = arg;
    155155    rtems_status_code sc;
    156     rtems_unsigned8 intvec;
     156    uint8_t        intvec;
    157157   
    158158    switch (minor)
  • c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2c.c

    r6cfc0a4 rb7044dc  
    2424 */
    2525static void
    26 i2c_transfer_sema_done_func(rtems_unsigned32 arg)
     26i2c_transfer_sema_done_func(uint32_t        arg)
    2727{
    2828    rtems_id sema = (rtems_id)arg;
     
    3939 */
    4040static void
    41 i2c_transfer_poll_done_func(rtems_unsigned32 arg)
     41i2c_transfer_poll_done_func(uint32_t        arg)
    4242{
    4343    rtems_boolean *poll_done_flag = (rtems_boolean *)arg;
     
    103103    poll_done_flag = 0;
    104104    sc = i2c_transfer(bus, nmsg, msg, i2c_transfer_poll_done_func,
    105                       (rtems_unsigned32)&poll_done_flag);
     105                      (uint32_t)&poll_done_flag);
    106106    if (sc != RTEMS_SUCCESSFUL)
    107107        return sc;
     
    197197 */
    198198i2c_message_status
    199 i2c_wrbyte(i2c_bus_number bus, i2c_address addr, rtems_unsigned8 cmd)
     199i2c_wrbyte(i2c_bus_number bus, i2c_address addr, uint8_t        cmd)
    200200{
    201201    i2c_message msg;
    202     rtems_unsigned8 data = cmd;
     202    uint8_t        data = cmd;
    203203    msg.addr = addr;
    204204    msg.flags = I2C_MSG_WR;
     
    292292 */
    293293i2c_message_status
    294 i2c_wbrd(i2c_bus_number bus, i2c_address addr, rtems_unsigned8 cmd,
     294i2c_wbrd(i2c_bus_number bus, i2c_address addr, uint8_t        cmd,
    295295         void *bufr, int sizer)
    296296{
    297297    i2c_message msg[2];
    298     rtems_unsigned8 bufw = cmd;
     298    uint8_t        bufw = cmd;
    299299    msg[0].addr = addr;
    300300    msg[0].flags = I2C_MSG_WR | I2C_MSG_ERRSKIP;
  • c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2cdrv.c

    r6cfc0a4 rb7044dc  
    5050    int               nmsg;     /* number of messages in transfer */
    5151    i2c_transfer_done done;     /* transfer done callback function */
    52     rtems_unsigned32  done_arg; /* arbitrary argument to done callback */
     52    uint32_t          done_arg; /* arbitrary argument to done callback */
    5353} i2c_qel;
    5454
     
    8686 */
    8787static void
    88 i2cdrv_done(rtems_unsigned32 arg)
     88i2cdrv_done(uint32_t        arg)
    8989{
    9090    rtems_interrupt_level level;
     
    122122        }
    123123        sc = mcfmbus_i2c_transfer(&mbus, qel->nmsg, qel->msg, i2cdrv_done,
    124                                   (rtems_unsigned32)qel);
     124                                  (uint32_t)qel);
    125125        if (sc != RTEMS_SUCCESSFUL)
    126126        {
     
    130130                qel->msg[i].status = I2C_RESOURCE_NOT_AVAILABLE;
    131131            }
    132             i2cdrv_done((rtems_unsigned32)qel);
     132            i2cdrv_done((uint32_t)qel);
    133133        }
    134134    }
     
    157157rtems_status_code
    158158i2c_transfer(i2c_bus_number bus, int nmsg, i2c_message *msg,
    159              i2c_transfer_done done, rtems_unsigned32 done_arg)
     159             i2c_transfer_done done, uint32_t        done_arg)
    160160{
    161161    i2c_qel qel;
  • c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h

    r6cfc0a4 rb7044dc  
    194194
    195195#define delay( microseconds ) \
    196   { register rtems_unsigned32 _delay=(microseconds); \
    197     register rtems_unsigned32 _tmp=123; \
     196  { register uint32_t        _delay=(microseconds); \
     197    register uint32_t        _tmp=123; \
    198198    asm volatile( "0: \
    199199                     nbcd      %0 ; \
  • c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h

    r6cfc0a4 rb7044dc  
    3636
    3737/* I2C Bus Number type */
    38 typedef rtems_unsigned32 i2c_bus_number;
     38typedef uint32_t        i2c_bus_number;
    3939
    4040/* I2C device address */
    41 typedef rtems_unsigned16 i2c_address;
     41typedef uint16_t        i2c_address;
    4242
    4343/* I2C error codes generated during message transfer */
     
    5555typedef struct i2c_message {
    5656    i2c_address        addr;   /* I2C slave device address */
    57     rtems_unsigned16   flags;  /* message flags (see below) */
     57    uint16_t           flags;  /* message flags (see below) */
    5858    i2c_message_status status; /* message transfer status code */
    59     rtems_unsigned16   len;    /* Number of bytes to read or write */
    60     rtems_unsigned8   *buf;    /* pointer to data array */
     59    uint16_t           len;    /* Number of bytes to read or write */
     60    uint8_t           *buf;    /* pointer to data array */
    6161} i2c_message;
    6262
     
    6868                                   is failed */
    6969/* Type for function which is called when transfer over I2C bus is finished */
    70 typedef void (*i2c_transfer_done) (rtems_unsigned32 arg);
     70typedef void (*i2c_transfer_done) (uint32_t        arg);
    7171
    7272/* i2c_initialize --
     
    125125rtems_status_code
    126126i2c_transfer(i2c_bus_number bus, int nmsg, i2c_message *msg,
    127              i2c_transfer_done done, rtems_unsigned32 done_arg);
     127             i2c_transfer_done done, uint32_t        done_arg);
    128128
    129129/* i2c_transfer_wait --
     
    188188 */
    189189i2c_message_status
    190 i2c_wrbyte(i2c_bus_number bus, i2c_address addr, rtems_unsigned8 cmd);
     190i2c_wrbyte(i2c_bus_number bus, i2c_address addr, uint8_t        cmd);
    191191
    192192/* i2c_read --
     
    240240 */
    241241i2c_message_status
    242 i2c_wbrd(i2c_bus_number bus, i2c_address addr, rtems_unsigned8 cmd,
     242i2c_wbrd(i2c_bus_number bus, i2c_address addr, uint8_t        cmd,
    243243         void *bufr, int sizer);
    244244
  • c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c

    r6cfc0a4 rb7044dc  
    9696{
    9797    rtems_libio_rw_args_t *args = arg;
    98     unsigned32 count;
     98    uint32_t  count;
    9999    i2c_bus_number bus = DS1307_I2C_BUS_NUMBER;
    100100    i2c_address    addr = DS1307_I2C_ADDRESS;
     
    139139{
    140140    rtems_libio_rw_args_t *args = arg;
    141     unsigned32 count;
     141    uint32_t  count;
    142142    i2c_bus_number bus = DS1307_I2C_BUS_NUMBER;
    143143    i2c_address    addr = DS1307_I2C_ADDRESS;
     
    160160        int try = 0;
    161161        do {
    162             rtems_unsigned8 buf[DS1307_NVRAM_SIZE + 1];
     162            uint8_t        buf[DS1307_NVRAM_SIZE + 1];
    163163            buf[0] = DS1307_NVRAM_START + args->offset;
    164164            memcpy(buf+1, args->buffer, count);
  • c/src/lib/libbsp/m68k/mcf5206elite/startup/bspstart.c

    r6cfc0a4 rb7044dc  
    5252 
    5353void bsp_postdriver_hook(void);
    54 void bsp_libc_init( void *, unsigned32, int );
     54void bsp_libc_init( void *, uint32_t, int );
    5555void bsp_pretasking_hook(void);               /* m68k version */
    5656
  • c/src/lib/libbsp/m68k/mcf5206elite/startup/init5206e.c

    r6cfc0a4 rb7044dc  
    203203    {
    204204        extern void INTERRUPT_VECTOR();
    205         rtems_unsigned32 *inttab = (rtems_unsigned32 *)&INTERRUPT_VECTOR;
    206         rtems_unsigned32 *intvec = (rtems_unsigned32 *)BSP_MEM_ADDR_ESRAM;
     205        uint32_t         *inttab = (uint32_t*)&INTERRUPT_VECTOR;
     206        uint32_t         *intvec = (uint32_t*)BSP_MEM_ADDR_ESRAM;
    207207        register int i;
    208208        for (i = 0; i < 256; i++)
  • c/src/lib/libbsp/m68k/mcf5206elite/tod/ds1307.c

    r6cfc0a4 rb7044dc  
    5151    i2c_message_status status;
    5252    int try;
    53     rtems_unsigned8 sec;
     53    uint8_t        sec;
    5454    i2c_bus_number bus;
    5555    i2c_address addr;
     
    6868    if ((sec & DS1307_SECOND_HALT) != 0)
    6969    {
    70         rtems_unsigned8 start[8];
     70        uint8_t        start[8];
    7171        memset(start, 0, sizeof(start));
    7272        start[0] = DS1307_SECOND;
     
    9595    i2c_bus_number bus;
    9696    i2c_address addr;
    97     rtems_unsigned8 info[8];
    98     rtems_unsigned32 v1, v2;
     97    uint8_t        info[8];
     98    uint32_t        v1, v2;
    9999    i2c_message_status status;
    100100    int try;
     
    176176    i2c_bus_number bus;
    177177    i2c_address addr;
    178     rtems_unsigned8 info[8];
     178    uint8_t        info[8];
    179179    i2c_message_status status;
    180180    int try;
Note: See TracChangeset for help on using the changeset viewer.