Changeset 642c500 in rtems


Ignore:
Timestamp:
Apr 26, 2010, 12:58:39 AM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
8f9457e
Parents:
c0c5635
Message:

2010-04-25 Joel Sherrill <joel.sherrilL@…>

  • libchip/serial/mc68681.c, libchip/serial/mc68681_reg.c, libchip/serial/ns16550.c, libchip/serial/serial.h, libchip/serial/z85c30.c, libchip/serial/z85c30_reg.c: Use uintptr_t or intptr_t instead of uint32_t or int32_t.
Location:
c/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/ChangeLog

    rc0c5635 r642c500  
     12010-04-25      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * libchip/serial/mc68681.c, libchip/serial/mc68681_reg.c,
     4        libchip/serial/ns16550.c, libchip/serial/serial.h,
     5        libchip/serial/z85c30.c, libchip/serial/z85c30_reg.c: Use uintptr_t
     6        or intptr_t instead of uint32_t or int32_t.
     7
    182010-04-25      Joel Sherrill <joel.sherrilL@OARcorp.com>
    29
  • c/src/libchip/serial/mc68681.c

    rc0c5635 r642c500  
    593593  baud_requested = rtems_termios_baud_to_index( baud_requested );
    594594
    595   baud_tbl = (mc68681_baud_table_t *) Console_Port_Tbl[minor].ulClock;
     595  baud_tbl = (mc68681_baud_table_t *)
     596     ((uintptr_t)Console_Port_Tbl[minor].ulClock);
    596597  if (!baud_tbl)
    597598    rtems_fatal_error_occurred(RTEMS_INVALID_ADDRESS);
  • c/src/libchip/serial/mc68681_reg.c

    rc0c5635 r642c500  
    3232
    3333uint8_t   _MC68681_NAME(mc68681_get_register)(
    34   uint32_t    ulCtrlPort,
     34  uintptr_t   ulCtrlPort,
    3535  uint8_t     ucRegNum
    3636)
     
    4848
    4949void  _MC68681_NAME(mc68681_set_register)(
    50   uint32_t    ulCtrlPort,
     50  uintptr_t   ulCtrlPort,
    5151  uint8_t     ucRegNum,
    5252  uint8_t     ucData
  • c/src/libchip/serial/ns16550.c

    rc0c5635 r642c500  
    9696NS16550_STATIC void ns16550_init(int minor)
    9797{
    98   uint32_t                pNS16550;
     98  uintptr_t               pNS16550;
    9999  uint8_t                 ucTrash;
    100100  uint8_t                 ucDataByte;
     
    130130  ulBaudDivisor = NS16550_Baud(
    131131    (uint32_t) Console_Port_Tbl[minor].ulClock,
    132     (uint32_t) Console_Port_Tbl[minor].pDeviceParams
     132    (uint32_t) ((uintptr_t)Console_Port_Tbl[minor].pDeviceParams)
    133133  );
    134134  ucDataByte = SP_LINE_DLAB;
     
    184184
    185185  /* Set initial baud */
    186   rtems_termios_set_initial_baud( tty, (int32_t) c->pDeviceParams);
     186  rtems_termios_set_initial_baud( tty, (intptr_t) c->pDeviceParams);
    187187
    188188  if (c->pDeviceFns->deviceOutputUsesInterrupts) {
     
    218218 * @brief Polled write for NS16550.
    219219 */
    220 NS16550_STATIC void ns16550_write_polled( int minor, char out)
     220NS16550_STATIC void ns16550_write_polled(int minor, char out)
    221221{
    222222  console_tbl *c = &Console_Port_Tbl [minor];
    223   uint32_t port = c->ulCtrlPort1;
     223  uintptr_t port = c->ulCtrlPort1;
    224224  getRegister_f get = c->getRegister;
    225225  setRegister_f set = c->setRegister;
  • c/src/libchip/serial/serial.h

    rc0c5635 r642c500  
    2929 */
    3030
    31 typedef uint8_t   (*getRegister_f)(uint32_t   port, uint8_t   register);
    32 typedef void      (*setRegister_f)(
    33                             uint32_t   port, uint8_t   reg, uint8_t   value);
    34 typedef uint8_t   (*getData_f)(uint32_t   port);
    35 typedef void      (*setData_f)(uint32_t   port, uint8_t   value);
     31typedef uint8_t   (*getRegister_f)(uintptr_t port, uint8_t reg);
     32typedef void      (*setRegister_f)(uintptr_t port, uint8_t reg, uint8_t  value);
     33typedef uint8_t   (*getData_f)(uintptr_t port);
     34typedef void      (*setData_f)(uintptr_t port, uint8_t value);
    3635
    3736typedef struct _console_fns {
  • c/src/libchip/serial/z85c30.c

    rc0c5635 r642c500  
    9393)
    9494{
    95   uint32_t        ulCtrlPort;
    96   uint32_t        ulBaudDivisor;
     95  uintptr_t       ulCtrlPort;
     96  uintptr_t       ulBaudDivisor;
    9797  setRegister_f   setReg;
    9898
     
    139139  ulBaudDivisor = Z85C30_Baud(
    140140    (uint32_t) Console_Port_Tbl[minor].ulClock,
    141     (uint32_t) Console_Port_Tbl[minor].pDeviceParams
     141    (uint32_t) ((uintptr_t)Console_Port_Tbl[minor].pDeviceParams)
    142142  );
    143143
     
    254254Z85C30_STATIC void z85c30_init(int minor)
    255255{
    256   uint32_t         ulCtrlPort;
     256  uintptr_t        ulCtrlPort;
    257257  uint8_t          dummy;
    258258  z85c30_context  *pz85c30Context;
     
    431431)
    432432{
    433   uint32_t               ulCtrlPort;
     433  uintptr_t              ulCtrlPort;
    434434  uint32_t               ulBaudDivisor;
    435435  uint32_t               wr3;
  • c/src/libchip/serial/z85c30_reg.c

    rc0c5635 r642c500  
    2828
    2929uint8_t   _Z85C30_NAME(z85c30_get_register)(
    30   uint32_t    ulCtrlPort,
     30  uintptr_t   ulCtrlPort,
    3131  uint8_t     ucRegNum
    3232)
     
    5454
    5555void _Z85C30_NAME(z85c30_set_register)(
    56   uint32_t    ulCtrlPort,
     56  uintptr_t   ulCtrlPort,
    5757  uint8_t     ucRegNum,
    5858  uint8_t     ucData
Note: See TracChangeset for help on using the changeset viewer.