OneWay  3.0-3-ge9d4fa4
Functions
transmit.c File Reference

Interface and API from PC to TX module. More...

#include <stdlib.h>
#include <string.h>
#include <avr/io.h>
#include <util/delay.h>
#include "transmit.h"
Include dependency graph for transmit.c:

Functions

void start_tx (void)
 Enable TX signal. More...
 
void stop_tx (void)
 Disable TX signal.
 
void tx_str (const char *str, const uint8_t port)
 transmit a string on the air More...
 
void host_get_command (char *cmd, const uint8_t echo)
 wait until a command is entered. More...
 
void p_cmd (struct htv_t *htv, struct debug_t *debug)
 pin related command in the form: P:AAAA:PP:C
 
void master (struct debug_t *debug)
 main TX loop
 

Detailed Description

Interface and API from PC to TX module.

Function Documentation

◆ host_get_command()

void host_get_command ( char *  cmd,
const uint8_t  echo 
)

wait until a command is entered.

Wait for a char from serial port and echo it if echo is '1'. The command is terminated by a '\r'.

See also
host_check_command()
Parameters
cmdpre-allocated space for the returned string.
echo1: echo the chars while typing.
Note
A maximum of MAX_CMD_LENGHT number of char can be entered. The last '\r' is substituted by a '\0' or, if the maximum number of char is reached, the last one is changed.

◆ start_tx()

void start_tx ( void  )

Enable TX signal.

Enable the serial port

Enable the transmit pin on the rtx only module

as described in the datasheet with delay timing.

add another delay for opening the squelch in the receiver.

◆ tx_str()

void tx_str ( const char *  str,
const uint8_t  port 
)

transmit a string on the air

Send the string with the header to the air.

Parameters
strthe string to be sent.
portthe serial port.