I have a simple question about mspgcc if anyone used it.
Most of the PIC compiler allow me to access individual bit of a port, for example:
With mspgcc I had no luck finding the similar way of dealing with it. The way I do it now is:
But I kinda hope there is "faster" way of doing so
Most of the PIC compiler allow me to access individual bit of a port, for example:
Code:
PORTA.F1 = 1;
PORTA.F1 = 0;
or
output_high(PORTA, 1);
output_low(PORTA, 1);
in CSC I can even make struct and do things like:
lcd.enable = 1;
With mspgcc I had no luck finding the similar way of dealing with it. The way I do it now is:
Code:
// definition of BIT# macro's
#include <msp430/common.h>
...
// set P1OUT.F0 to 0
P1OUT &= ~BIT0;
// set P1OUT.F0 to 1
P1OUT |= BIT0;
But I kinda hope there is "faster" way of doing so