Some compilers support C extensions to access individual bits, such as using PORTA.2 to access bit 2 of the IO register PORTA. By definition, extensions are not portable to other standard C compilers. Also, note that the bit-twiddling operations listed here produce the best code and are entirely portable. Furthermore, using the suggested macros above may make them easier to use. Therefore, our compilers do not support this extension.
Some users also want to use structure bitfields to access IO register bits. While this would work for a pointer to structure with suitable casting of the pointer to the correct IO address, it requires an extension to the language to overlay a structure type at a specific IO register location. Furthermore, bitfield allocation order is not specified by the C language, and typically bitfields do not generate the best code. We strongly encourage you to use the bit-twiddling operators
В общем лучше всего писать в машинных кодах, можно получить самый "хороший" код, что я когда то и делал
Назад на дерево!


