Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Defines | Functions

Touc Sensor MUX
[Mindsensors]

Files

file  mindsensors-touchmux.h
 

Mindsensors Touch Multiplexer Sensor driver.


Defines

#define MSTMUX_LOW_1   60
#define MSTMUX_HIGH_1   160
#define MSTMUX_LOW_2   210
#define MSTMUX_HIGH_2   290
#define MSTMUX_LOW_12   370
#define MSTMUX_HIGH_12   460
#define MSTMUX_LOW_3   500
#define MSTMUX_HIGH_3   599
#define MSTMUX_LOW_13   600
#define MSTMUX_HIGH_13   658
#define MSTMUX_LOW_23   659
#define MSTMUX_HIGH_23   723
#define MSTMUX_LOW_123   724
#define MSTMUX_HIGH_123   800
#define MSTMUX_SMUX_LOW_1   163
#define MSTMUX_SMUX_HIGH_1   203
#define MSTMUX_SMUX_LOW_2   263
#define MSTMUX_SMUX_HIGH_2   303
#define MSTMUX_SMUX_LOW_12   373
#define MSTMUX_SMUX_HIGH_12   413
#define MSTMUX_SMUX_LOW_3   473
#define MSTMUX_SMUX_HIGH_3   513
#define MSTMUX_SMUX_LOW_13   523
#define MSTMUX_SMUX_HIGH_13   563
#define MSTMUX_SMUX_LOW_23   568
#define MSTMUX_SMUX_HIGH_23   598
#define MSTMUX_SMUX_LOW_123   603
#define MSTMUX_SMUX_HIGH_123   643

Functions

int MSTMUXgetActive (tSensors link)
bool MSTMUXisActive (tSensors link, int touch)
int MSTMUXgetActive (tMUXSensor muxsensor)
bool MSTMUXisActive (tMUXSensor muxsensor, int touch)

Detailed Description

Touc Sensor MUX


Define Documentation

#define MSTMUX_HIGH_1   160

Definition at line 44 of file mindsensors-touchmux.h.

#define MSTMUX_HIGH_12   460

Definition at line 48 of file mindsensors-touchmux.h.

#define MSTMUX_HIGH_123   800

Definition at line 56 of file mindsensors-touchmux.h.

#define MSTMUX_HIGH_13   658

Definition at line 52 of file mindsensors-touchmux.h.

#define MSTMUX_HIGH_2   290

Definition at line 46 of file mindsensors-touchmux.h.

#define MSTMUX_HIGH_23   723

Definition at line 54 of file mindsensors-touchmux.h.

#define MSTMUX_HIGH_3   599

Definition at line 50 of file mindsensors-touchmux.h.

#define MSTMUX_LOW_1   60

Definition at line 43 of file mindsensors-touchmux.h.

#define MSTMUX_LOW_12   370

Definition at line 47 of file mindsensors-touchmux.h.

#define MSTMUX_LOW_123   724

Definition at line 55 of file mindsensors-touchmux.h.

#define MSTMUX_LOW_13   600

Definition at line 51 of file mindsensors-touchmux.h.

#define MSTMUX_LOW_2   210

Definition at line 45 of file mindsensors-touchmux.h.

#define MSTMUX_LOW_23   659

Definition at line 53 of file mindsensors-touchmux.h.

#define MSTMUX_LOW_3   500

Definition at line 49 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_HIGH_1   203

Definition at line 59 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_HIGH_12   413

Definition at line 63 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_HIGH_123   643

Definition at line 71 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_HIGH_13   563

Definition at line 67 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_HIGH_2   303

Definition at line 61 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_HIGH_23   598

Definition at line 69 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_HIGH_3   513

Definition at line 65 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_LOW_1   163

Definition at line 58 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_LOW_12   373

Definition at line 62 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_LOW_123   603

Definition at line 70 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_LOW_13   523

Definition at line 66 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_LOW_2   263

Definition at line 60 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_LOW_23   568

Definition at line 68 of file mindsensors-touchmux.h.

#define MSTMUX_SMUX_LOW_3   473

Definition at line 64 of file mindsensors-touchmux.h.


Function Documentation

int MSTMUXgetActive ( tSensors  link )

Read the value of all of the currently connected touch sensors. The status is logically OR'd together. Touch 1 = 1, Touch 2 = 2, Touch 3 = 4, Touch 4 = 8. If Touch 1 and 3 are active, the return value will be 1 + 4 == 5.

Parameters:
linkthe MSTMUX port number
Returns:
the value of the switches status
Examples:
mindsensors-touchmux-test1.c.

Definition at line 89 of file mindsensors-touchmux.h.

int MSTMUXgetActive ( tMUXSensor  muxsensor )

Read the value of all of the currently connected touch sensors. The status is logically OR'd together. Touch 1 = 1, Touch 2 = 2, Touch 3 = 4, Touch 4 = 8. If Touch 1 and 3 are active, the return value will be 1 + 4 == 5.

Parameters:
muxsensorthe SMUX sensor port number
Returns:
the value of the switches status

Definition at line 128 of file mindsensors-touchmux.h.

bool MSTMUXisActive ( tMUXSensor  muxsensor,
int  touch 
)

Read the value of specific touch sensor.

Parameters:
muxsensorthe SMUX sensor port number
touchthe touch sensor to be checked, numbered 1 to 4.
Returns:
the value of the switches status

Definition at line 175 of file mindsensors-touchmux.h.

bool MSTMUXisActive ( tSensors  link,
int  touch 
)

Read the value of specific touch sensor.

Parameters:
linkthe MSTMUX port number
touchthe touch sensor to be checked, numbered 1 to 4.
Returns:
the value of the switches status
Examples:
mindsensors-touchmux-test1.c.

Definition at line 160 of file mindsensors-touchmux.h.