OneWay
3.0-3-ge9d4fa4
|
Main struct of the project and eventually defaults. More...
Go to the source code of this file.
Data Structures | |
struct | htv_t |
Macros | |
#define | MAX_CMD_LENGHT 20 |
#define | MAX_SUBSTR_LENGHT 10 |
#define | AU_PORT PORTA |
#define | AU_DDR DDRA |
#define | AU_ENABLE PA5 |
#define | AU_TXRX PA6 |
Functions | |
void | htv_store_address (struct htv_t *htv) |
store the address of the unit in EEPROM. | |
struct htv_t * | htv_init (struct htv_t *htv) |
initialize the htv struct | |
void | htv_free (struct htv_t *htv) |
free the htv struct. More... | |
uint8_t | crc8_str (const char *str) |
return the crc8 of the string. More... | |
uint8_t | htv_check_cmd (struct htv_t *htv) |
check the validity of the x10str command string. More... | |
Main struct of the project and eventually defaults.
#define AU_DDR DDRA |
data direction register
#define AU_ENABLE PA5 |
enable tx pin connected to.
#define AU_PORT PORTA |
port where the rtx modules is connected
#define AU_TXRX PA6 |
switch tx/rx pin connected to.
#define MAX_CMD_LENGHT 20 |
command's number of char
#define MAX_SUBSTR_LENGHT 10 |
helpfull substring max number of char
uint8_t crc8_str | ( | const char * | str | ) |
return the crc8 of the string.
str | the string |
uint8_t htv_check_cmd | ( | struct htv_t * | htv | ) |
check the validity of the x10str command string.
Based on the string lenght, choose which protocol to check. If cmd is not correct clear the cmd string and return FALSE else if cmd is ok, modify cmd and keep only AAAAPPC.
void htv_free | ( | struct htv_t * | htv | ) |
free the htv struct.