在msgpcc(GSP for MSP430微控制器)手册中,作者写道:
如果要在函数中使用小整数,请使用int而不是char或unsigned char.生成的代码将更有效,并且在大多数情况下,实际上不会浪费存储.
为什么int效率更高?
int
UPD.为什么(u)int_fast8_t在mspgcc中定义(unsigned) char,而不是(unsigned) int.据我所知,(u)int_fast*_t应该定义为具有足够大小的最有效类型.
(u)int_fast8_t
(unsigned) char
(unsigned) int
(u)int_fast*_t
c microcontroller assembly msp430 mspgcc
在mspgcc中声明中断处理程序的首选方法是什么?
msp430 mspgcc
msp430 ×2
mspgcc ×2
assembly ×1
c ×1
microcontroller ×1