#ifndef __COMM_HPP__
#define __COMM_HPP__

void TWI_init (void); // Initializes I2C interface (for communication with sensors)
void TWI_start(void); // Sends I2C START signal
void TWI_stop(void); // Sends I2C STOP signal
void TWI_write(uint8_t data); // Sends I2C data after copying it to TWDR
uint8_t TWI_readACK(void); // Read data and send acknowledge
uint8_t TWI_readNACK(void); // Read data without sending acknowledge
uint8_t TWI_status(void); // Read TWI status
void UART_init (uint16_t BRRegVal); // Initialize UART interface
void UART_transmit_start( uint8_t data ); // Transmit address via UART
void UART_transmit_data( uint8_t data ); // Transmit data via UART
void UART_flush( void ); // Flush UART data register UDR0
ISR (USART_RX_vect); // UART receive interrupt routine
ISR (USART_TX_vect); // UART transmission complete interrupt routine
#endif
