milan.rajik
Banned
- Joined
- Apr 1, 2013
- Messages
- 2,524
- Helped
- 540
- Reputation
- 1,078
- Reaction score
- 524
- Trophy points
- 1,393
- Activity points
- 0
How to make a bit structure ?
I have ports like PORTB, PORTD, DDRD, etc... In mikroC PRO AVR Compiler we can write like DDRB.F0 = 1 to set bit 0 of DDRB register. I want to do a similar thing in Atmel Studio projects. How can I define a structure and use the DDRx, PORTx, PINx, or any required registers with bit access like DDRB.F4 ?
I have ports like PORTB, PORTD, DDRD, etc... In mikroC PRO AVR Compiler we can write like DDRB.F0 = 1 to set bit 0 of DDRB register. I want to do a similar thing in Atmel Studio projects. How can I define a structure and use the DDRx, PORTx, PINx, or any required registers with bit access like DDRB.F4 ?