Main Page | Modules | File List | Globals

Peripheral_Access_Functions


Functions

unsigned char hemisson_get_proximity (char Sensor)
 Get proximity value of one IR sensor.

unsigned char hemisson_get_brightness (char Sensor)
 Get brightness value of one IR sensor.

int1 hemisson_get_switch_state (char Switch_Number)
 Get Switch State.

char hemisson_get_tv_data (void)
 Get latest data from the TV remote receiver.

void hemisson_set_speed (signed int8 LeftSpeed, signed int8 RightSpeed)
 Set speed of each motor.

void hemisson_beep (int1 State)
 Set the buzzer State.

void hemisson_led_frontleft (int1 State)
 Set the FrontLeft Led State.

void hemisson_led_frontright (int1 State)
 Set the FrontRight Led State.

void hemisson_led_pgmexec (int1 State)
 Set the PgmExec Led State.

void hemisson_led_onoff (int1 State)
 Set the OnOff Led State.

void hemisson_manual_refresh_sensors (char Zone)
 Manualy refresh a zone.


Function Documentation

void hemisson_beep int1  State  ) 
 

Set the buzzer State.

Parameters:
int1 State (0=Off,1=On)
Return values:
None 

Definition at line 258 of file hemisson.h.

References PIN_D4.

00259 {
00260    output_bit(PIN_D4,State);
00261 }

unsigned char hemisson_get_brightness char  Sensor  ) 
 

Get brightness value of one IR sensor.

Parameters:
char Front, FrontLeft, FrontRight, Left, Right, Rear, GroundLeft, GroundRight
Return values:
unsigned_char Brightness Value (0 when lot of light)

Definition at line 209 of file hemisson.h.

References __IR_Light.

00210 {
00211    return __IR_Light[Sensor];
00212 }

unsigned char hemisson_get_proximity char  Sensor  ) 
 

Get proximity value of one IR sensor.

Parameters:
char Front, FrontLeft, FrontRight, Left, Right, Rear, GroundLeft, GroundRight
Return values:
unsigned_char Proximity Value (0 when nothing)

Definition at line 197 of file hemisson.h.

References __IR_Proximity.

00198 {
00199    return __IR_Proximity[Sensor];
00200 }

int1 hemisson_get_switch_state char  Switch_Number  ) 
 

Get Switch State.

Parameters:
char Number of the switch (0,1,2 or 3)
Return values:
int1 Position of the switch (0 or 1)

Definition at line 221 of file hemisson.h.

References __Switchs.

00222 {
00223    return __Switchs[Switch_Number];
00224 }

char hemisson_get_tv_data void   ) 
 

Get latest data from the TV remote receiver.

Parameters:
None 
Return values:
char Byte that have been received

Definition at line 233 of file hemisson.h.

References __TV_DATA.

00234 {
00235    return __TV_DATA;
00236 }

void hemisson_led_frontleft int1  State  ) 
 

Set the FrontLeft Led State.

Parameters:
int1 State (0=Off,1=On)
Return values:
None 

Definition at line 270 of file hemisson.h.

References PIN_D6.

00271 {
00272    output_bit(PIN_D6,State);
00273 }

void hemisson_led_frontright int1  State  ) 
 

Set the FrontRight Led State.

Parameters:
int1 State (0=Off,1=On)
Return values:
None 

Definition at line 282 of file hemisson.h.

References PIN_A4.

00283 {
00284    output_bit(PIN_A4,!State);
00285 }

void hemisson_led_onoff int1  State  ) 
 

Set the OnOff Led State.

Parameters:
int1 State (0=Off,1=On)
Return values:
None 
Warning:
This Led is controlled in background by the Scheduler

Definition at line 307 of file hemisson.h.

References PIN_D7.

00308 {
00309    output_bit(PIN_D7,State);
00310 }

void hemisson_led_pgmexec int1  State  ) 
 

Set the PgmExec Led State.

Parameters:
int1 State (0=Off,1=On)
Return values:
None 

Definition at line 294 of file hemisson.h.

References PIN_D5.

00295 {
00296    output_bit(PIN_D5,State);
00297 }

void hemisson_manual_refresh_sensors char  Zone  ) 
 

Manualy refresh a zone.

Parameters:
char Zone (FrontZone,GroundZone,RearZone)
Return values:
None 

Definition at line 319 of file hemisson.h.

References __hemisson_refresh_sensors().

00320 {
00321    __hemisson_refresh_sensors(Zone);
00322 }

void hemisson_set_speed signed int8  Left,
signed int8  Right
 

Set speed of each motor.

Parameters:
signed_int8 Speed of motor (from -9 to 9, 0 = Stop)
Return values:
None 

Definition at line 245 of file hemisson.h.

References __PwmMotLeft, and __PwmMotRight.

00246 {
00247    __PwmMotLeft = LeftSpeed;
00248    __PwmMotRight = RightSpeed;
00249 }


Generated on Mon Feb 23 23:53:23 2004 for HemiOs by doxygen 1.3.4