Pular para o conteúdo principal
Renesas Brasil - Knowledgebase

What effect does allocation by designating the Xbit order left option?

Latest Updated:09/04/2015


What effect does change the allocation of bits to bit fields by designating the -Xbit_order=left option have on access to peripheral I/O with the use of iodefine.h?


The file iodefine.h which is generated by CS+ defines bits in peripheral I/O as allocated to bit fields from the lowest-order bit by default. Designating the -Xbit_order=left option causes access to bits other than those intended, since it changes the arrangement to being from the highest-order bit.

  1. Designate the -Xbit_order=right option.
    If you need to designate the -Xbit_order=left option, enclose the code within iodefine.h between #pragma bit_order right and #pragma bit_order.
  2. In access to bits in registers of peripheral I/O after including iodefine.h, ensure that access is to the intended bits through either of the following methods.
Suitable Products
C Compiler Package for RH850 Family