Changed the transmit function to comply with the HAL