Contiki 3.x
Files | Macros | Functions

cc2538 CPU-specific functions for debugging and SLIP I/O More...

Files

file  dbg.c
 
Implementation of arch-specific functions required by the dbg_io API in
cpu/arm/common/dbg-io

 
file  dbg.h
 Header file for the cc2538 Debug I/O module.
 
file  debug-uart.h
 This file is here because DBG I/O expects it to be.
 
file  slip-arch.c
 Arch-specific SLIP functions for the cc2538.
 

Macros

#define dbg_flush()
 Flushes character output. More...
 

Functions

unsigned int dbg_send_bytes (const unsigned char *seq, unsigned int len)
 Print a stream of bytes. More...
 
void slip_arch_writeb (unsigned char c)
 Write a byte over SLIP. More...
 
void slip_arch_init (unsigned long ubr)
 Initialise the arch-specific SLIP driver. More...
 

Detailed Description

cc2538 CPU-specific functions for debugging and SLIP I/O

On the cc2538, character I/O can be directed over USB or UART. This is controlled by a series of configuration directives:

Defaults for those defines are set in contiki-conf.h

Macro Definition Documentation

#define dbg_flush ( )

Flushes character output.

When debugging is sent over USB, this functions causes the USB driver to immediately TX the content of output buffers. When debugging is over UART, this function does nothing.

There is nothing stopping you from using this macro in your code but normally, you won't have to.

Definition at line 83 of file dbg.h.

Function Documentation

unsigned int dbg_send_bytes ( const unsigned char *  seq,
unsigned int  len 
)

Print a stream of bytes.

Parameters
seqA pointer to the stream
lenThe number of bytes to print
Returns
The number of printed bytes

This function is an arch-specific implementation required by the dbg-io API in cpu/arm/common/dbg-io. It prints a stream of bytes over the peripheral used by the platform.

Definition at line 89 of file dbg.c.

void slip_arch_init ( unsigned long  ubr)

Initialise the arch-specific SLIP driver.

Initalize the RS232 port and the SLIP driver.

Parameters
ubrIgnored for the cc2538

Definition at line 80 of file slip-arch.c.

void slip_arch_writeb ( unsigned char  c)

Write a byte over SLIP.

Copyright (c) 2014, Analog Devices, Inc.

Parameters
cthe byte

Definition at line 67 of file slip-arch.c.