Go to the source code of this file.
Defines | |
#define | Usart_spi_hard_init() (PORTD |= 0x2C, DDRD |= 0x28, DDRD &= ~0x04) |
#define | Usart_hard_init_without_ctrl() (PORTD |= 0x0C, DDRD |= 0x08, DDRD &= ~0x04) |
#define | Usart_hard_init_with_ctrl() (PORTD |= 0xCC, DDRD |= 0x48, DDRD &= ~0x84) |
#define | Usart_spi_soft_init() |
#define | Usart_soft_init_with_ctrl() |
#define | Usart_soft_init_without_ctrl() |
#define | Usart_write_byte(dt) (UDR1 = dt) |
#define | Usart_read_byte() (UDR1) |
#define | Is_usart_byte_sent() (((UCSR1A&(1<<TXC1)) != 0) ? TRUE : FALSE) |
#define | Usart_clear_flag_send() (UCSR1A |= (1<<TXC1)) |
#define | Is_usart_byte_received() (((UCSR1A&(1<<RXC1)) != 0) ? TRUE : FALSE) |
#define | Usart_clear_flag_receive() (UCSR1A |= (1<<RXC1)) |
#define | Is_usart_data_reg_empty() (((UCSR1A&(1<<UDRE1)) != 0) ? TRUE : FALSE) |
#define | Delay_config_ms(ms) |
#define | Delay_config_us(us) |
#define | Delay_reset() (Timer16_set_counter(0x0000), Timer16_clear_compare_a_it()) |
#define | Is_delay_end() (Timer16_get_compare_a_it()) |
#define | Is_not_delay_end() (!(Timer16_get_compare_a_it())) |
#define | Bp_delay_debounce() { Delay_config_ms(20); Delay_reset(); while (Is_not_delay_end());} |
#define Usart_spi_hard_init | ( | ) | (PORTD |= 0x2C, DDRD |= 0x28, DDRD &= ~0x04) |
Definition at line 13 of file at90usb162_quickstart_drv.h.
#define Usart_hard_init_without_ctrl | ( | ) | (PORTD |= 0x0C, DDRD |= 0x08, DDRD &= ~0x04) |
Definition at line 14 of file at90usb162_quickstart_drv.h.
#define Usart_hard_init_with_ctrl | ( | ) | (PORTD |= 0xCC, DDRD |= 0x48, DDRD &= ~0x84) |
Definition at line 15 of file at90usb162_quickstart_drv.h.
#define Usart_spi_soft_init | ( | ) |
Value:
(UBRR1 = 0, \ UCSR1C = (1<<7)|(1<<6)|(1<<1)|(1<<0), \ UCSR1B = (1<<3)|(1<<4), \ UBRR1 = 4)
Definition at line 18 of file at90usb162_quickstart_drv.h.
#define Usart_soft_init_with_ctrl | ( | ) |
#define Usart_soft_init_without_ctrl | ( | ) |
#define Usart_write_byte | ( | dt | ) | (UDR1 = dt) |
Definition at line 35 of file at90usb162_quickstart_drv.h.
#define Usart_read_byte | ( | ) | (UDR1) |
Definition at line 36 of file at90usb162_quickstart_drv.h.
#define Is_usart_byte_sent | ( | ) | (((UCSR1A&(1<<TXC1)) != 0) ? TRUE : FALSE) |
Definition at line 37 of file at90usb162_quickstart_drv.h.
#define Usart_clear_flag_send | ( | ) | (UCSR1A |= (1<<TXC1)) |
Definition at line 38 of file at90usb162_quickstart_drv.h.
#define Is_usart_byte_received | ( | ) | (((UCSR1A&(1<<RXC1)) != 0) ? TRUE : FALSE) |
Definition at line 39 of file at90usb162_quickstart_drv.h.
#define Usart_clear_flag_receive | ( | ) | (UCSR1A |= (1<<RXC1)) |
Definition at line 40 of file at90usb162_quickstart_drv.h.
#define Is_usart_data_reg_empty | ( | ) | (((UCSR1A&(1<<UDRE1)) != 0) ? TRUE : FALSE) |
Definition at line 41 of file at90usb162_quickstart_drv.h.
#define Delay_config_ms | ( | ms | ) |
Value:
(Timer16_set_clock(TIMER16_CLKIO_BY_256), \ Timer16_set_mode_output_a(TIMER16_COMP_MODE_NORMAL), \ Timer16_set_waveform_mode(TIMER16_WGM_CTC_OCR), \ Timer16_set_compare_a((U16)(31)*(U16)(ms)))
Definition at line 46 of file at90usb162_quickstart_drv.h.
#define Delay_config_us | ( | us | ) |
Value:
(Timer16_set_clock(TIMER16_CLKIO_BY_8), \ Timer16_set_mode_output_a(TIMER16_COMP_MODE_NORMAL), \ Timer16_set_waveform_mode(TIMER16_WGM_CTC_OCR), \ Timer16_set_compare_a((U16)(us)))
Definition at line 50 of file at90usb162_quickstart_drv.h.
#define Delay_reset | ( | ) | (Timer16_set_counter(0x0000), Timer16_clear_compare_a_it()) |
Definition at line 55 of file at90usb162_quickstart_drv.h.
#define Is_delay_end | ( | ) | (Timer16_get_compare_a_it()) |
Definition at line 56 of file at90usb162_quickstart_drv.h.
#define Is_not_delay_end | ( | ) | (!(Timer16_get_compare_a_it())) |
Definition at line 57 of file at90usb162_quickstart_drv.h.
#define Bp_delay_debounce | ( | ) | { Delay_config_ms(20); Delay_reset(); while (Is_not_delay_end());} |
Definition at line 62 of file at90usb162_quickstart_drv.h.