MMEx with SPI Slave to allow legacy devices to communicate with modern media such as USB, SD cards, the internet and all of the mbed\'s other interfaces

Dependencies:   NetServices MSCUsbHost mbed TMP102 SDFileSystem

Embed: (wiki syntax)

« Back to documentation index

ufuncs.h File Reference

ufuncs.h File Reference

processing for U commands, to be filled in by users More...

Go to the source code of this file.

Functions

int read_reg (char *reg)
 read 7 bytes as a register from input stream
void show_reg (char *c, char *reg)
 show a register on the debug console
void parse_U ()
 main entry for parsing U-commands
void do_utemp ()
 read TMP02 temp sensor
void do_ustack ()
 receive stack from HP41
void do_ualpha ()
 receive alpha from HP41
void do_udefault ()
 send error message, command not recognized,

Detailed Description

processing for U commands, to be filled in by users

Definition in file ufuncs.h.


Function Documentation

void do_ualpha (  )

receive alpha from HP41

syntax: US<CR> [data]
[data] is a binary stream of 24 bytes procedure is like File Write due to processing of escape characters must send exact number of bytes, or terminate with '>F'

Definition at line 227 of file ufuncs.cpp.

void do_udefault (  )

send error message, command not recognized,

Definition at line 288 of file ufuncs.cpp.

void do_ustack (  )

receive stack from HP41

syntax: US<CR> [data]
[data] is a binary stream of 5* 7 bytes procedure is like File Write due to processing of escape characters must send exact number of bytes, or terminate with '>F' representing X, Y, Z, T, L

Definition at line 189 of file ufuncs.cpp.

void do_utemp (  )

read TMP02 temp sensor

syntax: UT return temp value in degrees C
UTF return temp value in degrees F

Definition at line 105 of file ufuncs.cpp.

void parse_U (  )

main entry for parsing U-commands

Definition at line 80 of file ufuncs.cpp.

int read_reg ( char *  reg )

read 7 bytes as a register from input stream

Parameters:
*regpointer to a register (14 chars)
Returns:
last char read if all OK, -1 or -2 when interrupted

Definition at line 126 of file ufuncs.cpp.

void show_reg ( char *  c,
char *  reg 
)

show a register on the debug console

Parameters:
*regpointer to a register (14 chars

Definition at line 172 of file ufuncs.cpp.