Skip to main content
greg_t
Associate III
August 13, 2010
Question

uint8_t definition

  • August 13, 2010
  • 16 replies
  • 7758 views
Posted on August 13, 2010 at 16:28

uint8_t definition

    This topic has been closed for replies.

    16 replies

    stforum2
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    http://en.wikipedia.org/wiki/Typedef

    stforum2
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    Ah yes, I remember that obscure definition.  I'll go back and take a look again.

    greg_t
    greg_tAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    I know how to use typedef

    but this line from the stdint.h 

    typedef __UINT8_T_TYPE__ uint8_t;

    does not make sense to me

    greg_t
    greg_tAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    Where can I read about the compiler specifics ?

    stforum2
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    Sorry I cannot find a reference to typedef __UINT8_T_TYPE__ uint8_t; any more.

    It was a few weeks ago.

    I vaguely remember that we could not find a definition of __UINT8_T_TYPE__ but I'm not sure.

    I think __UINT8_T_TYPE__ might be compiler specific.

    greg_t
    greg_tAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    You are wrong this is not compiler specific ...

    stforum2
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    These are things that are specific to a particular compiler implementation.

    So the documentation for your compiler is the main place that you should find them.

    greg_t
    greg_tAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    It looks like everybody knows that this declaration is there but nobody knows where to find it.

    domen23
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    Depends on your libc.

    In codesourcery (newlib) there's:

    typedef unsigned char uint8_t ;

    In others you should be able to track it down and eventually come to unsigned char.

    Andrew Neil
    Super User
    May 17, 2011
    Posted on May 17, 2011 at 14:02

    but this line from the stdint.h 

    typedef __UINT8_T_TYPE__ uint8_t;

    There is no stdint.h file in the STM32F10x_StdPeriph_Lib v3.3.0 download dated Apr-2010:

     

    http://www.st.com/stonline/products/support/micro/files/stm32f10x_stdperiph_lib.zip

    - so you must be looking at an earlier version, or something toolchain-specific.

    Note that, by convention, names in ALL CAPITALS are preprocessor #defines - so have you searched for a #define __UINT8_T_TYPE__   ?

    Any decent IDE should have a ''Go To Definition'' facility - have you tried that...?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.