2014-05-02 17:54:01 -04:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2017-08-23 22:06:13 -07:00
|
|
|
/* Copyright (c) 2013-2017 FIRST. All Rights Reserved. */
|
2014-05-02 17:54:01 -04:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
2016-05-25 20:23:37 -07:00
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
2014-05-02 17:54:01 -04:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2016-05-25 20:23:37 -07:00
|
|
|
|
2014-05-02 17:54:01 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2016-12-02 00:32:01 -08:00
|
|
|
#ifndef HAL_USE_LABVIEW
|
|
|
|
|
|
2016-07-12 10:45:14 -07:00
|
|
|
#include "HAL/Accelerometer.h"
|
|
|
|
|
#include "HAL/AnalogAccumulator.h"
|
|
|
|
|
#include "HAL/AnalogGyro.h"
|
|
|
|
|
#include "HAL/AnalogInput.h"
|
|
|
|
|
#include "HAL/AnalogOutput.h"
|
|
|
|
|
#include "HAL/AnalogTrigger.h"
|
2017-09-07 21:40:30 -07:00
|
|
|
#include "HAL/CAN.h"
|
2016-07-12 10:45:14 -07:00
|
|
|
#include "HAL/Compressor.h"
|
|
|
|
|
#include "HAL/Constants.h"
|
|
|
|
|
#include "HAL/Counter.h"
|
|
|
|
|
#include "HAL/DIO.h"
|
2016-07-17 19:42:33 -07:00
|
|
|
#include "HAL/DriverStation.h"
|
2016-07-12 10:45:14 -07:00
|
|
|
#include "HAL/Errors.h"
|
|
|
|
|
#include "HAL/I2C.h"
|
|
|
|
|
#include "HAL/Interrupts.h"
|
|
|
|
|
#include "HAL/Notifier.h"
|
|
|
|
|
#include "HAL/PDP.h"
|
|
|
|
|
#include "HAL/PWM.h"
|
|
|
|
|
#include "HAL/Ports.h"
|
|
|
|
|
#include "HAL/Power.h"
|
|
|
|
|
#include "HAL/Relay.h"
|
|
|
|
|
#include "HAL/SPI.h"
|
|
|
|
|
#include "HAL/SerialPort.h"
|
|
|
|
|
#include "HAL/Solenoid.h"
|
2016-12-02 00:32:01 -08:00
|
|
|
|
|
|
|
|
#endif // HAL_USE_LABVIEW
|
|
|
|
|
|
2016-07-12 10:45:14 -07:00
|
|
|
#include "HAL/Types.h"
|
2017-08-18 21:35:53 -07:00
|
|
|
#include "UsageReporting.h"
|
2014-05-02 17:54:01 -04:00
|
|
|
|
2016-06-19 00:15:57 -07:00
|
|
|
namespace HALUsageReporting = nUsageReporting;
|
|
|
|
|
|
2016-09-21 23:48:54 -07:00
|
|
|
enum HAL_RuntimeType : int32_t { HAL_Athena, HAL_Mock };
|
2016-09-13 21:21:57 -07:00
|
|
|
|
2016-07-12 21:53:06 -07:00
|
|
|
#ifdef __cplusplus
|
2016-05-20 17:30:37 -07:00
|
|
|
extern "C" {
|
2016-07-12 21:53:06 -07:00
|
|
|
#endif
|
2016-12-02 00:32:01 -08:00
|
|
|
|
2016-07-09 00:24:26 -07:00
|
|
|
const char* HAL_GetErrorMessage(int32_t code);
|
|
|
|
|
|
2016-07-12 10:45:14 -07:00
|
|
|
int32_t HAL_GetFPGAVersion(int32_t* status);
|
|
|
|
|
int64_t HAL_GetFPGARevision(int32_t* status);
|
2016-07-09 00:24:26 -07:00
|
|
|
|
2017-12-04 20:05:51 -08:00
|
|
|
HAL_RuntimeType HAL_GetRuntimeType(void);
|
2016-07-12 10:45:14 -07:00
|
|
|
HAL_Bool HAL_GetFPGAButton(int32_t* status);
|
2016-07-09 00:24:26 -07:00
|
|
|
|
2016-07-12 10:45:14 -07:00
|
|
|
HAL_Bool HAL_GetSystemActive(int32_t* status);
|
|
|
|
|
HAL_Bool HAL_GetBrownedOut(int32_t* status);
|
2016-07-09 00:24:26 -07:00
|
|
|
|
2016-12-02 00:32:01 -08:00
|
|
|
void HAL_BaseInitialize(int32_t* status);
|
|
|
|
|
|
|
|
|
|
#ifndef HAL_USE_LABVIEW
|
|
|
|
|
|
|
|
|
|
HAL_PortHandle HAL_GetPort(int32_t channel);
|
|
|
|
|
HAL_PortHandle HAL_GetPortWithModule(int32_t module, int32_t channel);
|
|
|
|
|
|
|
|
|
|
uint64_t HAL_GetFPGATime(int32_t* status);
|
|
|
|
|
|
2017-07-01 00:43:06 -07:00
|
|
|
HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode);
|
2016-07-09 00:24:26 -07:00
|
|
|
|
2016-07-12 21:53:06 -07:00
|
|
|
// ifdef's definition is to allow for default parameters in C++.
|
|
|
|
|
#ifdef __cplusplus
|
2016-07-12 10:45:14 -07:00
|
|
|
int64_t HAL_Report(int32_t resource, int32_t instanceNumber,
|
|
|
|
|
int32_t context = 0, const char* feature = nullptr);
|
2016-07-12 21:53:06 -07:00
|
|
|
#else
|
|
|
|
|
int64_t HAL_Report(int32_t resource, int32_t instanceNumber, int32_t context,
|
|
|
|
|
const char* feature);
|
|
|
|
|
#endif
|
2016-12-02 00:32:01 -08:00
|
|
|
|
|
|
|
|
#endif // HAL_USE_LABVIEW
|
2016-07-12 21:53:06 -07:00
|
|
|
#ifdef __cplusplus
|
2017-10-16 19:56:08 -07:00
|
|
|
} // extern "C"
|
2016-07-12 21:53:06 -07:00
|
|
|
#endif
|