| EVShield v1.3 EVShield Library Reference by mindsensors.com

Public Member Functions | Public Attributes | List of all members
EVShieldUART Class Reference

EVShield UART Sensor class. also provides support for the EV3 Touch Sensor. More...

`#include <EVShieldUART.h>`

Inheritance diagram for EVShieldUART:

## Public Member Functions
| EVShieldUART ()
| EVShieldUART (EVShield *shield, SH_BankPort bp)
uint8_t | getMode ()
bool | setType (uint8_t type)
bool | writeLocation (uint8_t loc, uint8_t data)
int16_t | readLocationInt (uint8_t loc)
uint8_t | readLocationByte (uint8_t loc)
bool | init (EVShield *shield, SH_BankPort bp)
uint8_t | setMode (char newMode)
uint16_t | readValue ()
bool | readAndPrint (uint8_t loc, uint8_t len)

## Public Attributes
EVShield * | mp_shield
SH_BankPort | m_bp
int | m_offset

## Detailed Description

EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.

## Constructor & Destructor Documentation

## § EVShieldUART() [1/2]

EVShieldUART::EVShieldUART | ( |  | ) |

null constructor for the EVShieldUART class; need to init later

## § EVShieldUART() [2/2]

EVShieldUART::EVShieldUART | ( | EVShield * | shield,
|  | SH_BankPort | bp
| ) |  |

class constructor with pointer to EVShield and the bankport as a parameter; init is not needed

## Member Function Documentation

## § getMode()

uint8_t EVShieldUART::getMode | ( |  | ) |

get the mode of the sensor

## § init()

bool EVShieldUART::init | ( | EVShield * | shield,
|  | SH_BankPort | bp
| ) |  |

initialize the analog device with a pointed to the EVShield and the bank port it is connected to

## § readAndPrint()

bool EVShieldUART::readAndPrint | ( | uint8_t | loc,
|  | uint8_t | len
| ) |  |

internal function to examine the buffer

## § readLocationByte()

uint8_t EVShieldUART::readLocationByte | ( | uint8_t | loc | ) |

read the value from the device at given location and return as an integer

## § readLocationInt()

int16_t EVShieldUART::readLocationInt | ( | uint8_t | loc | ) |

read integer value from specificed location

## § readValue()

uint16_t EVShieldUART::readValue | ( |  | ) |

read sensor reading

## § setMode()

uint8_t EVShieldUART::setMode | ( | char | newMode | ) |

set mode of the sensor

## § setType()

bool EVShieldUART::setType | ( | uint8_t | type | ) |

set the type of the device on this port of the EVShield

## § writeLocation()

bool EVShieldUART::writeLocation | ( | uint8_t | loc,
|  | uint8_t | data
| ) |  |

write a byte at the given location (selects appropriate bank)

## Member Data Documentation

## § m_bp

SH_BankPort EVShieldUART::m_bp

bank port the analog device is connected to

## § m_offset

int EVShieldUART::m_offset

the data for uart sensors is stored in the bank, and there is a offset based on port

## § mp_shield

EVShield* EVShieldUART::mp_shield

pointer to the EVShield class instantiation used

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

- C:/Program Files (x86)/Arduino-1.6.12/libraries/EVShield/EVShieldUART.h
- C:/Program Files (x86)/Arduino-1.6.12/libraries/EVShield/EVShieldUART.cpp