async command void ResourceConfigure.configure()
{
atomic {
- msp430_usci_config_t* config = call Msp430UsciConfigure.get();
+ const msp430_usci_config_t* config = call Msp430UsciConfigure.get();
call Registers.setCtl1(UCSWRST);
signal UartStream.receivedByte(byte);
}
- default async command msp430_usci_config_t* Msp430UsciConfigure.get()
+ default async command const msp430_usci_config_t* Msp430UsciConfigure.get()
{
- static msp430_usci_config_t def = {
+ const static msp430_usci_config_t def = {
uart: {
ctl0: UCMODE_0, /* async, lsb first, 8N1 */
ctl1: UCSWRST|UCSSEL_1, /* clock uart from SMCLK */
/* Baud rates for UART mode. Only 32KHz modes work right now. */
typedef enum {
- /* UCOS16=0. UMCTL = UCBRFx << 4 + UCBRSx << 1 + UCOS16. */
+ /* UCOS16=0. UMCTL = UCBRFx << 4 + UCBRSx << 1 + UCOS16.
+ * 1MHZ = 1,048576HZ, 1E6MHZ = 1,000,000HZ.
+ */
UBRX_32768HZ_9600=3, UMCTL_32768HZ_9600=(0 << 4) + (3 << 1) + 0,
UBRX_1MHZ_9600=109, UMCTL_1MHZ_9600=(0 << 4) + (2 << 1) + 0,
UBRX_1MHZ_115200=9, UMCTL_1MHZ_115200=(0 << 4) + (1 << 1) + 0,
+ UBRX_1E6MHZ_9600=104, UMCTL_1E6MHZ_9600=(0 << 4) + (1 << 1) + 0,
+ UBRX_1E6MHZ_115200=8, UMCTL_1E6MHZ_115200=(0 << 4) + (6 << 1) + 0,
} msp430_usci_uart_rate_t;
typedef union {