This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Naming Conventions used in StarterWare

I'm trying to find a description of the naming conventions used in StarterWare, particularly the prefixes that are used.

Here are examples of what I mean:

g_pucUSBRxBuffer      ("g_puc" ?   I guess the "puc" means "pointer to an unsigned character", but what is the "g"?)

tUSBBuffer                ("t"  ?   What is the t?  )

g_sTxBuffer               ( "g" I guess "s" is a string, but what is g?)

pfnTransfer                    ( "pfn" = pointer to a function?)

pvHandle                       ( "pv"  = pointer to a value?)

pcBuffer                         ( "pc" = pointer to a char?)

ulBufferSize                   ( "ul" = unsigned long?)

Is there a description somewhere of this naming convention?

Thanks for your help.

-- Walter

  • I believe the naming conventions in Startware are inherited from StellarisWare. The basis of the convention is the Hungarian naming convention. In the change from StellarisWare to TivaWare, there is some note of the naming convention changes here:

    http://www.ti.com/lit/pdf/spma050
    SPMA050A
    Migrating Software Projects from StellarisWare to TivaWare
    3.3 C99 Types and Hungarian Prefix Changes
    Table 3. Data Types Used in StellarisWare and TivaWare
    Table 4. Hungarian Prefixes Changed in TivaWare

    b = bool
    c = char
    s = short
    l = long
    ll = long long
    uc = unsigned char
    us = unsigned short
    ul = unsigned long
    ull = unsigned long long

    p<prefix> = pointer pcFoo, pui32Foo
    t = typedef t tFoo
    e = enumeration values
    pfn = function pointer
    s = structure variable
    u = union variable
    i = enumeration variable
    p<prefix> = array
    pp<prefix> = Pointer to pointer or two- dimensional array

    I am guessing
    v = void
    g_ = global
  • Thanks Norman Wong,  that's exactly what I needed.

    -- Walter