mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
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:
committed by
Peter Johnson
parent
4a98e68815
commit
b51e85ae26
@@ -9,14 +9,14 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "HAL/Handles.h"
|
||||
#include "HAL/Types.h"
|
||||
|
||||
extern "C" {
|
||||
HAL_DigitalHandle HAL_InitializePWMPort(HAL_PortHandle port_handle,
|
||||
int32_t* status);
|
||||
void HAL_FreePWMPort(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
|
||||
bool HAL_CheckPWMChannel(uint8_t pin);
|
||||
HAL_Bool HAL_CheckPWMChannel(int32_t pin);
|
||||
|
||||
void HAL_SetPWMConfig(HAL_DigitalHandle pwm_port_handle, double maxPwm,
|
||||
double deadbandMaxPwm, double centerPwm,
|
||||
@@ -30,21 +30,21 @@ void HAL_GetPWMConfigRaw(HAL_DigitalHandle pwm_port_handle, int32_t* maxPwm,
|
||||
int32_t* deadbandMinPwm, int32_t* minPwm,
|
||||
int32_t* status);
|
||||
void HAL_SetPWMEliminateDeadband(HAL_DigitalHandle pwm_port_handle,
|
||||
uint8_t eliminateDeadband, int32_t* status);
|
||||
uint8_t HAL_GetPWMEliminateDeadband(HAL_DigitalHandle pwm_port_handle,
|
||||
int32_t* status);
|
||||
void HAL_SetPWMRaw(HAL_DigitalHandle pwm_port_handle, uint16_t value,
|
||||
HAL_Bool eliminateDeadband, int32_t* status);
|
||||
HAL_Bool HAL_GetPWMEliminateDeadband(HAL_DigitalHandle pwm_port_handle,
|
||||
int32_t* status);
|
||||
void HAL_SetPWMRaw(HAL_DigitalHandle pwm_port_handle, int32_t value,
|
||||
int32_t* status);
|
||||
void HAL_SetPWMSpeed(HAL_DigitalHandle pwm_port_handle, float speed,
|
||||
void HAL_SetPWMSpeed(HAL_DigitalHandle pwm_port_handle, double speed,
|
||||
int32_t* status);
|
||||
void HAL_SetPWMPosition(HAL_DigitalHandle pwm_port_handle, float position,
|
||||
void HAL_SetPWMPosition(HAL_DigitalHandle pwm_port_handle, double position,
|
||||
int32_t* status);
|
||||
void HAL_SetPWMDisabled(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
uint16_t HAL_GetPWMRaw(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
float HAL_GetPWMSpeed(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
float HAL_GetPWMPosition(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
int32_t HAL_GetPWMRaw(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
double HAL_GetPWMSpeed(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
double HAL_GetPWMPosition(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
void HAL_LatchPWMZero(HAL_DigitalHandle pwm_port_handle, int32_t* status);
|
||||
void HAL_SetPWMPeriodScale(HAL_DigitalHandle pwm_port_handle,
|
||||
uint32_t squelchMask, int32_t* status);
|
||||
uint16_t HAL_GetLoopTiming(int32_t* status);
|
||||
int32_t squelchMask, int32_t* status);
|
||||
int32_t HAL_GetLoopTiming(int32_t* status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user