Defines | |
#define | TRIGINT_ANGLES_PER_CYCLE 0x4000 |
The number of angle units per sine wave cycle. | |
#define | TRIGINT_ANGLE_MAX 0x3FFF |
The maximum angle value, before rolling over to the next cycle. | |
Typedefs | |
typedef uint16_t | trigint_angle_t |
A 14-bit angle, 0 - 0x3FFFF. |
#define TRIGINT_ANGLES_PER_CYCLE 0x4000 |
The number of angle units per sine wave cycle.
In other words, the number of angle units in a circle.
#define TRIGINT_ANGLE_MAX 0x3FFF |
The maximum angle value, before rolling over to the next cycle.
Can be used as a mask to keep the angle within the nominal values:
trigint_angle_t angle = ... ; angle += phaseOffset; angle &= TRIGINT_ANGLE_MAX;
typedef uint16_t trigint_angle_t |
A 14-bit angle, 0 - 0x3FFFF.
This divides the circle into 16,384 angle units, instead of the standard 360 degrees. Thus: