I'm porting a vendor's source code to TI DSP 6410 platform.
I get "nonstandard type for a bit field" warning from compiler when following structure declaration is compiled:
typedef unsigned short int cs_uint16 ;
typedef unsigned int cs_uint32 ;
typedef union {
struct {
cs_uint16 HSIFe : 1 ; /* bits 0:0 */
cs_uint16 XFIe : 1 ; /* bits 1:1 */
cs_uint16 N40Ge : 1 ; /* bits 2:2 */
cs_uint16 OHPPe : 1 ; /* bits 3:3 */
cs_uint16 N10G0e : 1 ; /* bits 4:4 */
cs_uint16 N10G1e : 1 ; /* bits 5:5 */
cs_uint16 N10G2e : 1 ; /* bits 6:6 */
cs_uint16 N10G3e : 1 ; /* bits 7:7 */
cs_uint16 PP10G0e : 1 ; /* bits 8:8 */
cs_uint16 PP10G1e : 1 ; /* bits 9:9 */
cs_uint16 PP10G2e : 1 ; /* bits 10:10 */
cs_uint16 PP10G3e : 1 ; /* bits 11:11 */
cs_uint16 PP40Ge : 1 ; /* bits 12:12 */
cs_uint16 CFPe : 1 ; /* bits 13:13 */
cs_uint16 CUPLLe : 1 ; /* bits 14:14 */
cs_uint16 rsrvd1 : 1 ;
} bf ;
cs_uint16 wrd ;
} TEN_MPIF_MODULE_B_INTENABLE_t;
In place of cs_unit16, if I use cs_unit32, problem goes away.
Does TI compiler not support 16bit packed bit-fields?
I can't change this structure to 32 bit wide because this structure is used to R/W hardware memory which is 16 bit wide.
Please help.
thanks,
Nitin