Herzog Library 00.00.01  rel_libdev.herzog.00.00.01.10606
Data Structures | Macros | Functions | Variables
tx_device.c File Reference
#include <stdint.h>
#include <string.h>
#include "tx_device.h"
#include "rf_codec.h"
#include "errno.h"

Data Structures

struct  TX_Dev_State_t
 A structure to represent TX device state. More...
 

Macros

#define BURST_BIT_SIZE_DFLT   160
 
#define WAIT_BIT_SIZE_DLFT   63
 
#define TX_PREAMBLE   0x55
 
#define TX_START   0x08
 
#define TX_STOP   0x80
 
#define TX_MSG_OVERHEAD   8 /* the size for preamble, start, stop etc.*/
 

Functions

int32_t tx_format_data (DCM_FMT_t fmt, uint8_t *data, uint32_t len)
 
int32_t tx_init (TX_Config_t *cfg)
 
static void tx_load_data (void)
 
static int32_t tx_send_data (uint8_t *data, uint32_t len)
 
int32_t tx_stop (void)
 
static int32_t tx_is_busy (void)
 
TX_Device_tTX_devRequest (void)
 Request a TX device. More...
 
int32_t TX_devInit (TX_Device_t *dev, TX_Config_t *cfg)
 Initialize TX device. More...
 
int32_t TX_devSendData (TX_Device_t *dev, uint8_t *data, uint32_t size)
 Send data to TX device. More...
 
int32_t TX_devStop (TX_Device_t *dev)
 Stop transmission. More...
 
int32_t TX_devDataPendingTX (TX_Device_t *dev)
 
int32_t TX_devRegisterCallback (TX_Device_t *dev, void *cb)
 Register a call back function to TX device driver. More...
 
int32_t TX_devUnregisterCallback (TX_Device_t *dev)
 Un-Register a call back function to TX device driver. More...
 
void TX_DONE_Handler (void)
 
void TX_RELOAD_Handler (void)
 

Variables

TX_Dev_State_t TX_State
 

Detailed Description

This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.

Macro Definition Documentation

#define BURST_BIT_SIZE_DFLT   160
#define TX_MSG_OVERHEAD   8 /* the size for preamble, start, stop etc.*/
#define TX_PREAMBLE   0x55
#define TX_START   0x08
#define TX_STOP   0x80
#define WAIT_BIT_SIZE_DLFT   63

Function Documentation

int32_t TX_devDataPendingTX ( TX_Device_t dev)
int32_t TX_devInit ( TX_Device_t dev,
TX_Config_t cfg 
)

Initialize TX device.

Parameters
devPointer to TX Device structure
cfgPointer to TX config data structure
Returns
0 for success or error code upon a failure
int32_t TX_devRegisterCallback ( TX_Device_t dev,
void *  cb 
)

Register a call back function to TX device driver.

Parameters
devPointer to TX Device structure
cbThe pointer to the call back function.
Returns
0 for success or error code upon a failure
TX_Device_t* TX_devRequest ( void  )

Request a TX device.

Returns
The pointer to the TX device or NULL upon a failure.
int32_t TX_devSendData ( TX_Device_t dev,
uint8_t *  data,
uint32_t  len 
)

Send data to TX device.

Parameters
devPointer to TX Device structure.
dataPointer to the data memory to be sent.
lenThe size of the data memory.
Returns
0 for success or error code upon a failure
int32_t TX_devStop ( TX_Device_t dev)

Stop transmission.

Parameters
devPointer to TX Device structure.
Returns
0 for success or error code upon a failure
int32_t TX_devUnregisterCallback ( TX_Device_t dev)

Un-Register a call back function to TX device driver.

Parameters
devPointer to TX Device structure
Returns
0 for success or error code upon a failure
void TX_DONE_Handler ( void  )
int32_t tx_format_data ( DCM_FMT_t  fmt,
uint8_t *  data,
uint32_t  len 
)
int32_t tx_init ( TX_Config_t cfg)
static int32_t tx_is_busy ( void  )
static
static void tx_load_data ( void  )
static
void TX_RELOAD_Handler ( void  )
static int32_t tx_send_data ( uint8_t *  data,
uint32_t  len 
)
static
int32_t tx_stop ( void  )

Variable Documentation

TX_Dev_State_t TX_State
Initial value:
= {
.format = DCM_FMT_4BIT,
.burst_size = BURST_BIT_SIZE_DFLT,
.wait_size = WAIT_BIT_SIZE_DLFT,
.buf_size = TX_BUFF_SIZE,
.tx_buffer = {0},
.tx_index = 0,
.tx_length = 0,
.cb = NULL,
.busy = 0,
}
#define BURST_BIT_SIZE_DFLT
Definition: tx_device.c:18
#define TX_BUFF_SIZE
Definition: tx_device.h:19
Definition: rf_codec.h:23
#define WAIT_BIT_SIZE_DLFT
Definition: tx_device.c:19