Hi,
I'm using the ST32F103G uC and Keli uVision 4.22 IDE.
Something that I don't understand is how to use single bits as variables or as a function return value. With other compilers I know 'bit' and 'bool' but somehow this doesn't seem to work with the armcc compiler. I searched the Internet but could not find anything in that direction.
Who can help me out?
Thanks in advance,
Henk
the Cortex-M3 have
• Bit-banding. The bus matrix converts bit-band alias accesses into bit-band region accesses. It performs: — bit field extract for bit-band loads — atomic read-modify-write for bit-band stores.
to use it you must use the variable names/addresses from the ST library
Erik
But note that bit-banding is a processor extension to get an alternative way to access individual bits in integers. A kind of hw-accelerated bit fields. There are no new data types involved so it can't be used to create a function with a bit-sized return type.
Even if there exists library functions that makes use of bit banding, it's possible to use by any program with zero suppot from compiler or libraries.
It is an integral part of the ARM Cortex-M3 architecture - nothing specifically to do with ST, or their library.