logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

zmienne i ich wielkość w avrgcc

janbernat 25 Sie 2010 18:16 1988 7
REKLAMA
  • #1 8437504
    janbernat
    Poziom 38  
    Szukam w avrlibc i w opisie typów danych w C.
    No i nie mogę znaleźć jakiegoś całościowego opisu.
    W <stdint.h> jest opis chyba specyficznych dla avrlibc wielkości zmiennych.
    Ale w programach spotykam deklaracje int- co w opisie standardu- musi mieć co najmniej 16 bitów.
    Czyli co- int16_t to jest to samo co int?
    Podobnie z double- czytałem że traktowane jest jak float.
    A float- "musi mieć dokładność przynajmniej 6 cyfr".
    A double- "musi mieć dokładność przynajmniej 10 cyfr".
    A w:
    char* dtostrf ( double __val,
    signed char __width,
    unsigned char __prec,
    char * __s
    )
    jest double.
    Podobnie w dtostre.
    Gdzie to znaleźć?
    Bo szukam i szukam i jestem coraz głupszy.
  • REKLAMA
  • REKLAMA
  • Pomocny post
    #3 8437555
    gaskoin
    Poziom 38  
    char is 8 bits, int is 16 bits, long is 32 bits, long long is 64bits, float and
    double are 32 bits(this is the only supported floating point format),pointers are 16 bits (function pointers are word addresses, to allow addressing up to 128K
    program memory space).There is a -mint8 option(see Options for the C
    compiler avr-gcc) to make int 8 bits, but that is not supported by avr-libc and
    violates C standards (int must be at least 16 bits). It may be removed in a future
    release.


    i w manualu do avr-libc na stronie 179 jest opis wszystkich typów
  • REKLAMA
  • #4 8437574
    janbernat
    Poziom 38  
    gaskoin- to jeszcze- gdzie to jest?
    No i to:
    "It may be removed in a future
    release".
    No i szukam w manualu- i nic.
    User manual 1.7.0
    No i nie mogę znaleźć:
    * Toolchain Overview
    * Memory Areas and Using malloc()
    * Memory Sections
    * Data in Program Space
    * avr-libc and assembler programs
    * Inline Assembler Cookbook
    * How to Build a Library
    * Benchmarks
    * Porting From IAR to AVR GCC
    * Frequently Asked Questions
    * Building and Installing the GNU Tool Chain
    * Using the GNU tools
    * Compiler optimization
    * Using the avrdude program
    * Release Numbering and Methodology
    * Acknowledgments
    * Todo List
    * Deprecated List
  • Pomocny post
    #5 8437771
    gaskoin
    Poziom 38  
    też mam 1.7.0 i po depracated list jeszcze mam pare innych tytułów. Między innymi są opisy bibilotek.

    Ale to chyba i tak nie to o co Ci chodziło
  • REKLAMA
  • #6 8437965
    janbernat
    Poziom 38  
    Dzięki, jest tam coś jeszcze.
    Ale dalej nie wiem skąd jest to
    "Kod:
    char is 8 bits,"
    itd.
  • Pomocny post
    #7 8440046
    gaskoin
    Poziom 38  
    Ze strony 72 z samego dołu :)
  • #8 9393049
    janbernat
    Poziom 38  
    Jest na str. 72- dzięki.
REKLAMA