NewAskSin
 All Classes Files Functions Variables Groups Pages
HAL_atmega328P.h
1 #define power_serial_enable() power_usart0_enable();
2 #define UCSR UCSR0B
3 #define RXEN RXEN0
4 
5 //- cc1100 hardware definitions ---------------------------------------------------------------------------------------------
6 #define SPI_PORT PORTB // SPI port definition
7 #define SPI_DDR DDRB
8 #define SPI_MISO PORTB4
9 #define SPI_MOSI PORTB3
10 #define SPI_SCLK PORTB5
11 //- -------------------------------------------------------------------------------------------------------------------------
12 
13 
14 //- power management definitions --------------------------------------------------------------------------------------------
15 #define backupPwrRegs() uint8_t xPrr = PRR; PRR = 0xFF;
16 #define recoverPwrRegs() PRR = xPrr;
17 #define offBrownOut() MCUCR = (1<<BODS)|(1<<BODSE); MCUCR = (1<<BODS);
18 //- -------------------------------------------------------------------------------------------------------------------------
19 
20 
21 //- adc definitions ---------------------------------------------------------------------------------------------------------
22 #define AVR_BANDGAP_VOLTAGE 1100UL // band gap reference for Atmega328p