upm  0.1.8
Sensor/Actuator repository for libmraa (v0.4.5)
 All Data Structures Files Functions Variables Macros Pages
Public Member Functions | Static Public Attributes
SM130 Class Reference

C++ API for SM130 RFID reader module. More...

Detailed Description

This file defines the SM130 C++ interface for libsm130

Public Member Functions

 SM130 (int bus, int devAddr, int rst, int dready)
 
 ~SM130 ()
 
const char * getFirmwareVersion ()
 
uint8_t available ()
 
uint8_t getPacketLength ()
 
uint8_t getCommand ()
 
std::string name ()
 

Static Public Attributes

static const uint8_t MIFARE_ULTRALIGHT = 1
 
static const uint8_t MIFARE_1K = 2
 
static const uint8_t MIFARE_4K = 3
 
static const uint8_t CMD_RESET = 0x80
 
static const uint8_t CMD_VERSION = 0x81
 
static const uint8_t CMD_SEEK_TAG = 0x82
 
static const uint8_t CMD_SELECT_TAG = 0x83
 
static const uint8_t CMD_AUTHENTICATE = 0x85
 
static const uint8_t CMD_READ16 = 0x86
 
static const uint8_t CMD_READ_VALUE = 0x87
 
static const uint8_t CMD_WRITE16 = 0x89
 
static const uint8_t CMD_WRITE_VALUE = 0x8a
 
static const uint8_t CMD_WRITE4 = 0x8b
 
static const uint8_t CMD_WRITE_KEY = 0x8c
 
static const uint8_t CMD_INC_VALUE = 0x8d
 
static const uint8_t CMD_DEC_VALUE = 0x8e
 
static const uint8_t CMD_ANTENNA_POWER = 0x90
 
static const uint8_t CMD_READ_PORT = 0x91
 
static const uint8_t CMD_WRITE_PORT = 0x92
 
static const uint8_t CMD_HALT_TAG = 0x93
 
static const uint8_t CMD_SET_BAUD = 0x94
 
static const uint8_t CMD_SLEEP = 0x96
 

Constructor & Destructor Documentation

SM130 ( int  bus,
int  devAddr,
int  rst,
int  dready 
)

Instanciates a SM130 object

Parameters
didata pin
dckiclock pin
~SM130 ( )

SM130 object destructor

Member Function Documentation

const char * getFirmwareVersion ( )

Get the firmware version string.

Here is the call graph for this function:

uint8_t available ( )

Checks for availability of a valid response packet.

This function should always be called and return true prior to using results of a command.

Returns
true if a valid response packet is available

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t getPacketLength ( )
inline

Returns the packet length, excluding checksum

Here is the caller graph for this function:

uint8_t getCommand ( )
inline

Returns the last executed command

Here is the caller graph for this function:

std::string name ( )
inline

Return name of the component


The documentation for this class was generated from the following files: