
Utility functions. More...
#include "LoUtils.h"#include "LoTimer.h"#include <stdlib.h>
Go to the source code of this file.
Functions | |
| int | lo_clamp (int n, int min, int max) |
| Clamp the given value to lie within [min, max]. | |
| char | lo_sign (int n) |
| char | lo_lobyte (int word) |
| Return a random number within the specified range. | |
| char | lo_hibyte (int word) |
| Return the high byte of a 16-bit word. | |
| int | lo_make_word (char hi, char lo) |
| Combine two bytes into a single word. | |
Utility functions.
Definition in file LoUtils.c.
| int lo_clamp | ( | int | n, | |
| int | min, | |||
| int | max | |||
| ) |
Clamp the given value to lie within [min, max].
Definition at line 55 of file LoUtils.c.
Referenced by lo_forward(), and lo_left().
| char lo_hibyte | ( | int | word | ) |
Return the high byte of a 16-bit word.
Definition at line 94 of file LoUtils.c.
Referenced by lo_bumps(), lo_cliffs(), and lo_update_odometry().
| char lo_lobyte | ( | int | ) |
Return a random number within the specified range.
Return the low byte of a 16-bit word
Definition at line 89 of file LoUtils.c.
Referenced by lo_bumps(), lo_cliffs(), lo_enable_rear_bumps(), and lo_update_odometry().
| int lo_make_word | ( | char | hi, | |
| char | lo | |||
| ) |
Combine two bytes into a single word.
Definition at line 99 of file LoUtils.c.
Referenced by lo_backup(), lo_spin(), and lo_update_odometry().
1.6.3