Doubt regarding microcontroller program

// structure to allow bit field operations, name conversions: PORTA.0 -> PORT_A.b0 PORTB.7 -> PORT_B.b7
typedef struct{ uint8_t b0:1;
uint8_t b1:1;
uint8_t b2:1;
uint8_t b3:1;
uint8_t b4:1;
uint8_t b5:1;
uint8_t b6:1;
uint8_t b7:1; } bits;

// define all the ports of your microcontroller, add more ports depending on the available mcu ports
#define PORT_A (* (volatile bits *) &PORTA)

I want to know what is the last line - #define PORT_A (* (volatile bits *) &PORTA)
in the program doing .
where PORTA is the PORT of a uC

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!