µracoli Manual  Version foo
HostInterface API

Communicating with the host computer.
More...

Detailed Description

Overview

uracoli_modules_hif.png
HostInterface API in liburacoli_<board>.a
Usage
Examples

Functions

void hif_dump ( uint16_t  sz,
uint8_t *  d 
)
Parameters
sznumber of bytes, that will be dumped.
dpointer to the data array, that will be dumped.
Examples:
xmpl_i2c.c.
void hif_echo ( FLASH_STRING_T  str)
Parameters
strstring, which is located in flash memory
Examples:
xmpl_hif.c, and xmpl_hif_echo.c.
uint8_t hif_get_blk ( unsigned char *  data,
uint8_t  max_size 
)
Parameters
databuffer where the bytes are stored
max_sizemaximum number of bytes, which can be stored in the buffer.
Returns
number of bytes stored in the buffer
static int hif_get_dec_number ( void  )
static
Returns
integer value of the negative number.
Examples:
xmpl_isl29020.c, and xmpl_lm73.c.

Definition at line 192 of file hif.h.

static uint16_t hif_get_number ( int8_t  base)
static

Enter a integer number.

Parameters
basebase value for the number conversion, e.g. 10 for entering a decimal number.
Returns
16 bit unsigned integer value.

Definition at line 237 of file hif.h.

int hif_getc ( void  )
Returns
The Character or EOF in case of error or end-of-file
Examples:
xmpl_hif.c, xmpl_hif_echo.c, xmpl_i2c.c, xmpl_isl29020.c, xmpl_lm73.c, xmpl_ow.c, and xmpl_tsl2550.c.
void hif_init ( const uint32_t  baudrate)
void hif_printf ( FLASH_STRING_T  fmt,
  ... 
)
Parameters
fmtformat string, which is located in flash memory
...variable argument list
Examples:
xmpl_hif.c, and xmpl_hif_echo.c.
uint8_t hif_put_blk ( unsigned char *  data,
uint8_t  size 
)
Parameters
datapointer to the data array.
sizesize of the block.
Returns
num number of bytes, which was send.
Examples:
xmpl_hif.c, and xmpl_linbuf_rx.c.
int hif_putc ( int  c)
Parameters
dataCharacter to send
Returns
The Character or EOF in case of error
Examples:
xmpl_hif.c, xmpl_hif_echo.c, xmpl_i2c.c, and xmpl_ow.c.
void hif_puts ( const char *  s)
Parameters
spointer to a null terminated string, which is located in RAM.
Examples:
xmpl_i2c.c.
void hif_puts_p ( const char *  progmem_s)
Parameters
progmem_spointer to a null terminated string, which is located in program memory.
static int hif_split_args ( char *  txtline,
int  maxargs,
char **  argv 
)
static

This function creates argc,argv style data from a null terminated string. The splitting is done on the base of spaces (ASCII 32).

Parameters
txtlinestring to split
maxargsmaximum number of arguments to split
Return values
argvarray of pointers, that store the arguments
Returns
number of arguments splitted (argc)
Examples:
xmpl_i2c.c, and xmpl_ow.c.

Definition at line 162 of file hif.h.

Defines

#define DUMP (   sz,
  ptr 
)    hif_dump(sz,ptr)

Wrapper macro for hif_dump()

Examples:
xmpl_hif.c.

Definition at line 58 of file hif.h.

#define HIF_AT90USB   (31)

Identifier for HIF type USB/ATmega1287

Definition at line 240 of file const.h.

#define HIF_FT245   (30)

Identifier for HIF type USB/FT245

Definition at line 239 of file const.h.

#define HIF_NONE   (0)

Identifier for no host interface

Definition at line 229 of file const.h.

#define HIF_SERCOM0   (40)

Identifier for HIF type SERCOM0

Definition at line 243 of file const.h.

#define HIF_UART_0   (10)

Identifier for HIF type UART 0

Definition at line 232 of file const.h.

#define HIF_UART_1   (11)

Identifier for HIF type UART 1

Definition at line 233 of file const.h.

#define HIF_USARTD0   (20)

Identifier for HIF type USARTD0

Definition at line 236 of file const.h.

#define HIF_USARTE0   (21)

Identifier for HIF type USARTD0

Definition at line 237 of file const.h.

#define PRINT (   fmt)    hif_echo(FLASH_STRING(fmt))

Wrapper macro for hif_echo()

Examples:
xmpl_i2c.c, xmpl_isl29020.c, xmpl_lm73.c, xmpl_ow.c, and xmpl_tsl2550.c.

Definition at line 56 of file hif.h.

#define PRINTF (   fmt,
  ... 
)    hif_printf(FLASH_STRING(fmt), __VA_ARGS__)
#define URACOLI_USB_PID   (2183)

uracoli USB Product ID see also USB_VID_URACOLI

Definition at line 259 of file const.h.

#define URACOLI_USB_VID   (5824)

uracoli USB Vendor ID

The pair of the uracoli vendor id, device id are obtained by

Definition at line 254 of file const.h.