OpenWSN Firmware
openserial.h File Reference
#include "openwsn.h"

Go to the source code of this file.

Data Structures

struct  openserial_vars_t
 

Macros

#define SERIAL_OUTPUT_BUFFER_SIZE   256
 Number of bytes of the serial output buffer, in bytes. More...
 
#define SERIAL_INPUT_BUFFER_SIZE   200
 Number of bytes of the serial input buffer, in bytes. More...
 
#define SERFRAME_MOTE2PC_DATA   ((uint8_t)'D')
 
#define SERFRAME_MOTE2PC_STATUS   ((uint8_t)'S')
 
#define SERFRAME_MOTE2PC_INFO   ((uint8_t)'I')
 
#define SERFRAME_MOTE2PC_ERROR   ((uint8_t)'E')
 
#define SERFRAME_MOTE2PC_CRITICAL   ((uint8_t)'C')
 
#define SERFRAME_MOTE2PC_REQUEST   ((uint8_t)'R')
 
#define SERFRAME_PC2MOTE_SETROOT   ((uint8_t)'R')
 
#define SERFRAME_PC2MOTE_SETBRIDGE   ((uint8_t)'B')
 
#define SERFRAME_PC2MOTE_DATA   ((uint8_t)'D')
 
#define SERFRAME_PC2MOTE_TRIGGERTCPINJECT   ((uint8_t)'T')
 
#define SERFRAME_PC2MOTE_TRIGGERUDPINJECT   ((uint8_t)'U')
 
#define SERFRAME_PC2MOTE_TRIGGERICMPv6ECHO   ((uint8_t)'E')
 
#define SERFRAME_PC2MOTE_TRIGGERSERIALECHO   ((uint8_t)'S')
 

Enumerations

enum  { MODE_OFF = 0, MODE_INPUT = 1, MODE_OUTPUT = 2 }
 Modes of the openserial module. More...
 

Functions

void openserial_init (void)
 
owerror_t openserial_printStatus (uint8_t statusElement, uint8_t *buffer, uint8_t length)
 
owerror_t openserial_printInfo (uint8_t calling_component, uint8_t error_code, errorparameter_t arg1, errorparameter_t arg2)
 
owerror_t openserial_printError (uint8_t calling_component, uint8_t error_code, errorparameter_t arg1, errorparameter_t arg2)
 
owerror_t openserial_printCritical (uint8_t calling_component, uint8_t error_code, errorparameter_t arg1, errorparameter_t arg2)
 
owerror_t openserial_printData (uint8_t *buffer, uint8_t length)
 
uint8_t openserial_getNumDataBytes (void)
 
uint8_t openserial_getInputBuffer (uint8_t *bufferToWrite, uint8_t maxNumBytes)
 
void openserial_startInput (void)
 
void openserial_startOutput (void)
 
void openserial_stop (void)
 
bool debugPrint_outBufferIndexes (void)
 Trigger this module to print status information, over serial. More...
 
void openserial_echo (uint8_t *but, uint8_t bufLen)
 
void isr_openserial_rx (void)
 
void isr_openserial_tx (void)