Switches HAL to fixed length signed integers, and adds our own HAL_Bool Type (#155)

* Switches HAL to fixed length signed integers, and adds our own HAL_Bool type

* Replaces HAL Floats with Doubles

Doubles are just as fast as floats with optimizations turned on, so
switches to all doubles. All made doubles for consistency.

* Prepends HAL/ to HAL include files. Also fixes some range errors
This commit is contained in:
Thad House
2016-07-12 10:45:14 -07:00
committed by Peter Johnson
parent 4a98e68815
commit b51e85ae26
89 changed files with 900 additions and 795 deletions

View File

@@ -10,7 +10,7 @@
#include <stdint.h>
#include "HAL/AnalogTrigger.h"
#include "HAL/Handles.h"
#include "HAL/Types.h"
enum HAL_Counter_Mode {
HAL_Counter_kTwoPulse = 0,
@@ -30,7 +30,7 @@ void HAL_SetCounterUpSource(HAL_CounterHandle counter_handle,
HAL_AnalogTriggerType analogTriggerType,
int32_t* status);
void HAL_SetCounterUpSourceEdge(HAL_CounterHandle counter_handle,
bool risingEdge, bool fallingEdge,
HAL_Bool risingEdge, HAL_Bool fallingEdge,
int32_t* status);
void HAL_ClearCounterUpSource(HAL_CounterHandle counter_handle,
int32_t* status);
@@ -39,7 +39,7 @@ void HAL_SetCounterDownSource(HAL_CounterHandle counter_handle,
HAL_AnalogTriggerType analogTriggerType,
int32_t* status);
void HAL_SetCounterDownSourceEdge(HAL_CounterHandle counter_handle,
bool risingEdge, bool fallingEdge,
HAL_Bool risingEdge, HAL_Bool fallingEdge,
int32_t* status);
void HAL_ClearCounterDownSource(HAL_CounterHandle counter_handle,
int32_t* status);
@@ -48,7 +48,7 @@ void HAL_SetCounterUpDownMode(HAL_CounterHandle counter_handle,
void HAL_SetCounterExternalDirectionMode(HAL_CounterHandle counter_handle,
int32_t* status);
void HAL_SetCounterSemiPeriodMode(HAL_CounterHandle counter_handle,
bool highSemiPeriod, int32_t* status);
HAL_Bool highSemiPeriod, int32_t* status);
void HAL_SetCounterPulseLengthMode(HAL_CounterHandle counter_handle,
double threshold, int32_t* status);
int32_t HAL_GetCounterSamplesToAverage(HAL_CounterHandle counter_handle,
@@ -61,9 +61,11 @@ double HAL_GetCounterPeriod(HAL_CounterHandle counter_handle, int32_t* status);
void HAL_SetCounterMaxPeriod(HAL_CounterHandle counter_handle, double maxPeriod,
int32_t* status);
void HAL_SetCounterUpdateWhenEmpty(HAL_CounterHandle counter_handle,
bool enabled, int32_t* status);
bool HAL_GetCounterStopped(HAL_CounterHandle counter_handle, int32_t* status);
bool HAL_GetCounterDirection(HAL_CounterHandle counter_handle, int32_t* status);
HAL_Bool enabled, int32_t* status);
HAL_Bool HAL_GetCounterStopped(HAL_CounterHandle counter_handle,
int32_t* status);
HAL_Bool HAL_GetCounterDirection(HAL_CounterHandle counter_handle,
int32_t* status);
void HAL_SetCounterReverseDirection(HAL_CounterHandle counter_handle,
bool reverseDirection, int32_t* status);
HAL_Bool reverseDirection, int32_t* status);
}