Go to the source code of this file.
Typedefs | |
| typedef enum parity_val | Parity_val |
| typedef enum rs323_info_delete_options | rs232_struct_delete |
Enumerations | |
| enum | parity_val { NO_PARITY, ODD_PARITY, EVEN_PARITY } |
| enum | rs323_info_delete_options { READ, TMP_READ, WRITE, BOTH } |
Functions | |
| void | init (void) |
| void | init_timer (int prescale, unsigned int start_value) |
| void | init_usart (float baud, int databits, int stopbit, Parity_val parity) |
| init_usart function initializes our USART (configures all parameters) | |
| void | init_timer0_us (void) |
| init_timer0_ms(): This function is called to initialize Timer0 - 8Bit for delays | |
| void | init_timer0_ms (void) |
| init_timer0_ms(): This function is called to initialize Timer0 - 8Bit for delays | |
| void | init_timer1_sec (void) |
| init_timer1_sec(): This function is called to initialize Timer1 - 16Bit for delays | |
| void | idle (void) |
| idle(): This function is called on delays | |
| void | knight_rider (void) |
| knight_rider function to show user that controller has finished its startup | |
| void | switch_led (int which, char state) |
| switch_leds function to enable or disable a specific led | |
| void | usart_uc_write (void) |
| usart_uc_write function sends first character on USART | |
| void | usart_uc_read (void) |
| usart_uc_read function to save incoming USART data | |
| void | reset_uc_bt_device (int state) |
| reset_bt_device(): This function is called to reset the bluetooth device | |
| void | bt_device_uc_config (void) |
| bt_device_uc_config function to save incoming USART data | |
| void | usart_uc_control_int (void) |
| usart_uc_control_int function to enable or disable the USART DataRegisterEmpty Interrupt | |
It is used to control C167's register
Timer initialisation, Demoboard Initialisation, Innterrupt
If you want to use it for C167 (use devicedriver_167.c otherwise devicedriver_AVR90USB.c)
| typedef enum parity_val Parity_val |
| typedef enum rs323_info_delete_options rs232_struct_delete |
| enum parity_val |
| void bt_device_uc_config | ( | void | ) |
bt_device_uc_config function to save incoming USART data
This function is used to configure the bluetooth module with the correct settings
| no | params |
References BOTH, configure, and usart_clear_structure().
Referenced by bt_device_config().
| void idle | ( | void | ) |
idle(): This function is called on delays
This function sends the uC to IDLE MODE
You can call it whenever you want
| @return | void |
Referenced by my_delay().
| void init | ( | void | ) |
| void init_timer | ( | int | prescale, | |
| unsigned int | start_value | |||
| ) |
| void init_timer0_ms | ( | void | ) |
init_timer0_ms(): This function is called to initialize Timer0 - 8Bit for delays
This function is called on delays for one ore more milliseconds
It simple initializes T0 to interrupt every milliseconds
| @return | void |
Referenced by my_delay().
| void init_timer0_us | ( | void | ) |
init_timer0_ms(): This function is called to initialize Timer0 - 8Bit for delays
This function is called on delays for one ore more milliseconds
It simple initializes T0 to interrupt every milliseconds
| @return | void |
Referenced by my_delay().
| void init_timer1_sec | ( | void | ) |
init_timer1_sec(): This function is called to initialize Timer1 - 16Bit for delays
This function is called on delays for one or more seconds
It simple initializes T1 to interrupt every second
| @return | void |
Referenced by my_delay(), and my_timeout().
| void init_usart | ( | float | baud, | |
| int | databits, | |||
| int | stopbit, | |||
| Parity_val | parity | |||
| ) |
init_usart function initializes our USART (configures all parameters)
This function is used to initialize the USART (it also sets the Baud, Parity, Stop)
| channel | The Channel (Pin) we want to measure |
References BOTH, EVEN_PARITY, FREQ_CPU, NO_PARITY, ODD_PARITY, start_temp, and usart_clear_structure().
Referenced by main().
| void knight_rider | ( | void | ) |
knight_rider function to show user that controller has finished its startup
This function is used to visualize the finished startup process
| no | params |
References my_delay().
Referenced by main().
| void reset_uc_bt_device | ( | int | state | ) |
reset_bt_device(): This function is called to reset the bluetooth device
This function is called on bluetooth module reset
It's function is to disable TX and set the pin low for a period of time and after that TX is reenabled
| state | to enable or disable the transmitter pin of AVR |
Referenced by bt_device_reset().
| void switch_led | ( | int | which, | |
| char | state | |||
| ) |
switch_leds function to enable or disable a specific led
This function is used to enable or disable leds for visualizing processes
| which | (number of led), state (s = set => on, c = clear => dark) |
| void usart_uc_control_int | ( | void | ) |
usart_uc_control_int function to enable or disable the USART DataRegisterEmpty Interrupt
This function is used to toggle the UDRIE Bit in UCSR1B
| no | params |
| void usart_uc_read | ( | void | ) |
usart_uc_read function to save incoming USART data
This function is used to save data from USART in the rs232_info structure
| no | params |
References rs232_::last_receive, MAX_RS232_CHARACTERS, rs232_::readbuf, rs232_info, TMP_READ, rs232_::tmp_readbuf, and usart_clear_structure().
Referenced by ISR().
| void usart_uc_write | ( | void | ) |
usart_uc_write function sends first character on USART
This function is used to send characters on USART
| no | params |
References rs232_::last_transmit, rs232_::last_write, and rs232_info.
Referenced by usart_write().
1.5.8