Hi, I have this command to find the FLLD value in UCSCTL2. For the FLLREFDIV
in UCSCTL3 I'll need something similar.
command uint16_t Msp430FreqControl.getFLLD(uint8_t flld){
switch(flld){
case 0:
return 1;
case 1:
return 2;
case 2:
return 4;
case 3:
return 8;
case 4:
return 16;
case 5:
return 32;
case 6:
return 32;
case 7:
return 32;
default:
return 32;
}
return 32;
}
My question is, is it better to have this implementation or to have the
corresponding values of FLLD in an array in memory?
It would be something like:
command uint16_t Msp430FreqControl.getFLLD(uint8_t flld){
uint8_t FLLD_value [ ] = {1, 2, 4, 8, 16, 32, 32, 32};
return FLLD_value[flld];
}
Which one is lighter in terms of memory?
João
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help