• how to avoid the switch code
    I have the impression that the routine that process a switch statement is (justifiably?) complicated and slow. I have a case with a lot of case statements. To "help the compiler" the cases are 0...
  • switch case statement bouncing
    switch(periodplay) { default : NVIC_ST_RELOAD_R = 0;Sound_Off(); break; case 0x01: NVIC_ST_RELOAD_R = beatC0 ; break; case 0x02: NVIC_ST_RELOAD_R = beatD; break; case 0x04 : NVIC_ST_RELOAD_R =...
  • switch-case optimizing in armcc
    I hope that I can get more information about the switch-case optimizing in armcc. I can find something like these: http://www.keil.com/support/man/docs/c51/c51_optimize.htm http://www.keil...
  • Switch/Case in I2C interrupt
    Hi, I am using C8051F005 as I2C slave. In the I2C interrupt, there is switch/case statement to load SMB0DAT with data to be output based on the OP_CODE. There are 15 cases. The master will get wrong...
  • Switch and Case structure
    I am trying to do a simple function to return values based on the input...shown below. char func (unsigned char add) { signed char i; switch (add) { case 0: i = 0; break; case 1: i = 1; break;...