LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...>
    Date: Wed Jun 29 16:55:28 CEST 2005
    Subject: [openrisc] [or1ksim #116] Use uint8_t instead of char
    Top
    Hi,

    ChangeLog:
    * Use uint8_t instead of char.

    nog.
    -------------- next part --------------
    diff -upr --unidirectional-new-file ./peripheral/16450.c /home/nog/or1ksim-ac/peripheral/16450.c
    --- ./peripheral/16450.c 2005-06-18 18:29:55.000000000 +0200
    +++ /home/nog/or1ksim-ac/peripheral/16450.c 2005-06-11 19:33:47.000000000 +0200
    @@ -531,13 +529,14 @@ void uart_recv_char(void *dat)
    void uart_check_char(void *dat)
    {
    struct dev_16450 *uart = dat;
    - char buffer[1];
    + uint8_t buffer;
    int retval;

    /* Check if there is something waiting, and put it into rxser */
    - retval = channel_read(uart->channel, buffer, 1);
    + retval = channel_read(uart->channel, &buffer, 1);
    if(retval > 0) {
    - uart->iregs.rxser = (unsigned char)buffer[0];
    + TRACE("Shifting 0x%02"PRIx8" (`%c') into shift reg\n", buffer, buffer);
    + uart->iregs.rxser = buffer;
    uart->istat.receiveing = 1;
    SCHED_ADD(uart_recv_char, uart, uart->char_clks * UART_CLOCK_DIVIDER);
    return;

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.