Arthur Richard / ST7580
Embed: (wiki syntax)

« Back to documentation index

ST7580 Class Reference

ST7580 Class Reference

ST7580 driver. More...

#include <ST7580.h>

Public Member Functions

 ST7580 (PinName tx, PinName rx, PinName t_req, PinName reset, void(*usr_callback)(unsigned char *, int))
 Constructor.
void init ()
 Initialises the pins and UART needed for the driver.

Detailed Description

ST7580 driver.

here is a minimal example: void callback_function(unsigned char *data, int payload_length) { //Do what you want with the data } int main() { ST7580 shield(D8, D2, D13, D7, callback_function); shield.init(); wait(1); while(1) { shield.send_frame("Hello world!"); } }

Definition at line 28 of file ST7580.h.


Constructor & Destructor Documentation

ST7580 ( PinName  tx,
PinName  rx,
PinName  t_req,
PinName  reset,
void(*)(unsigned char *, int)  usr_callback 
)

Constructor.

ST7580 Constructor

Parameters:
tx: mbed UART transmission pin
rx: mbed UART reception pin
t_req: ST7580 transmit request pin
reset: ST7580 reset pin
usr_callback: callback to the user app with reception buffer, and payload length as arguments

Definition at line 3 of file ST7580.cpp.


Member Function Documentation

void init (  )

Initialises the pins and UART needed for the driver.

Creates the UART handle and needed pins

Definition at line 20 of file ST7580.cpp.