WPILibC++ 2024.3.2
HMB.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <stdint.h>
8
9struct HAL_HMBData {
10 struct AnalogInputs {
11 uint32_t Values[8];
12 uint32_t Reserved[8];
15 uint32_t Values[8];
16 uint32_t Reserved[8];
18 struct Accumulator0 {
19 uint32_t Count;
20 uint32_t Value0;
21 uint32_t Value1;
22 uint32_t Reserved[13];
24 struct Accumulator1 {
25 uint32_t Count;
26 uint32_t Value0;
27 uint32_t Value1;
28 uint32_t Reserved[13];
30 struct DI {
31 uint32_t Values;
33 uint32_t Reserved[14];
34 } DI;
36 struct Trigger {
37 uint8_t InHysteresis0 : 1;
38 uint8_t OverLimit0 : 1;
39 uint8_t Rising0 : 1;
40 uint8_t Falling0 : 1;
41 uint8_t InHysteresis1 : 1;
42 uint8_t OverLimit1 : 1;
43 uint8_t Rising1 : 1;
44 uint8_t Falling1 : 1;
45 } Trigger[4];
46 uint32_t Reserved[15];
48 struct Counters {
49 struct Counter {
50 uint32_t Direction : 1;
51 int32_t Value : 31;
52 } Counter[8];
53 uint32_t Reserved[8];
56 struct Timer {
57 uint32_t Period : 23;
58 int32_t Count : 8;
59 uint32_t Stalled : 1;
60 } Timer[8];
61 uint32_t Reserved[8];
63 struct Encoders {
64 struct Encoder {
65 uint32_t Direction : 1;
66 int32_t Value : 31;
67 } Encoder[8];
68 uint32_t Reserved[8];
71 struct Timer {
72 uint32_t Period : 23;
73 int32_t Count : 8;
74 uint32_t Stalled : 1;
75 } Timer[8];
76 uint32_t Reserved[8];
78 struct DutyCycle {
79 uint32_t Output[8];
80 uint32_t Reserved[8];
82 struct Interrupts {
83 struct Interrupt {
88 struct PWM {
89 uint32_t Headers[10];
90 uint32_t Reserved[6];
91 uint32_t MXP[10];
92 uint32_t Reserved2[6];
93 } PWM;
94 struct RelayDOAO {
95 uint32_t Relays;
96 uint32_t Reserved;
97 uint32_t AO[2];
98 uint32_t Reserved2[12];
100 struct Timestamp {
101 uint32_t Lower;
102 uint32_t Upper;
103 uint32_t Reserved[14];
105};
106
107extern "C" {
108
109void HAL_InitializeHMB(int32_t* status);
110
111const volatile HAL_HMBData* HAL_GetHMBBuffer(void);
112} // extern "C"
void HAL_InitializeHMB(int32_t *status)
const volatile HAL_HMBData * HAL_GetHMBBuffer(void)
Definition: HMB.h:18
uint32_t Reserved[13]
Definition: HMB.h:22
uint32_t Count
Definition: HMB.h:19
uint32_t Value1
Definition: HMB.h:21
uint32_t Value0
Definition: HMB.h:20
Definition: HMB.h:24
uint32_t Value1
Definition: HMB.h:27
uint32_t Value0
Definition: HMB.h:26
uint32_t Count
Definition: HMB.h:25
uint32_t Reserved[13]
Definition: HMB.h:28
Definition: HMB.h:10
uint32_t Reserved[8]
Definition: HMB.h:12
uint32_t Values[8]
Definition: HMB.h:11
uint8_t Falling1
Definition: HMB.h:44
uint8_t InHysteresis0
Definition: HMB.h:37
uint8_t Rising1
Definition: HMB.h:43
uint8_t Rising0
Definition: HMB.h:39
uint8_t Falling0
Definition: HMB.h:40
uint8_t OverLimit0
Definition: HMB.h:38
uint8_t InHysteresis1
Definition: HMB.h:41
uint8_t OverLimit1
Definition: HMB.h:42
Definition: HMB.h:35
struct HAL_HMBData::AnalogTriggers::Trigger Trigger[4]
uint32_t Reserved[15]
Definition: HMB.h:46
uint32_t Values[8]
Definition: HMB.h:15
uint32_t Reserved[8]
Definition: HMB.h:16
int32_t Count
Definition: HMB.h:58
uint32_t Period
Definition: HMB.h:57
uint32_t Stalled
Definition: HMB.h:59
Definition: HMB.h:55
uint32_t Reserved[8]
Definition: HMB.h:61
struct HAL_HMBData::CounterTimers::Timer Timer[8]
Definition: HMB.h:49
uint32_t Direction
Definition: HMB.h:50
int32_t Value
Definition: HMB.h:51
Definition: HMB.h:48
struct HAL_HMBData::Counters::Counter Counter[8]
uint32_t Reserved[8]
Definition: HMB.h:53
Definition: HMB.h:30
uint32_t Reserved[14]
Definition: HMB.h:33
uint32_t Values
Definition: HMB.h:31
uint32_t FilteredValues
Definition: HMB.h:32
Definition: HMB.h:78
uint32_t Reserved[8]
Definition: HMB.h:80
uint32_t Output[8]
Definition: HMB.h:79
int32_t Count
Definition: HMB.h:73
uint32_t Period
Definition: HMB.h:72
uint32_t Stalled
Definition: HMB.h:74
Definition: HMB.h:70
uint32_t Reserved[8]
Definition: HMB.h:76
struct HAL_HMBData::EncoderTimers::Timer Timer[8]
Definition: HMB.h:64
int32_t Value
Definition: HMB.h:66
uint32_t Direction
Definition: HMB.h:65
Definition: HMB.h:63
uint32_t Reserved[8]
Definition: HMB.h:68
struct HAL_HMBData::Encoders::Encoder Encoder[8]
uint32_t RisingTimestamp
Definition: HMB.h:85
uint32_t FallingTimestamp
Definition: HMB.h:84
Definition: HMB.h:82
struct HAL_HMBData::Interrupts::Interrupt Interrupt[8]
Definition: HMB.h:88
uint32_t Reserved2[6]
Definition: HMB.h:92
uint32_t Reserved[6]
Definition: HMB.h:90
uint32_t Headers[10]
Definition: HMB.h:89
uint32_t MXP[10]
Definition: HMB.h:91
Definition: HMB.h:94
uint32_t AO[2]
Definition: HMB.h:97
uint32_t Reserved
Definition: HMB.h:96
uint32_t Relays
Definition: HMB.h:95
uint32_t Reserved2[12]
Definition: HMB.h:98
Definition: HMB.h:100
uint32_t Lower
Definition: HMB.h:101
uint32_t Upper
Definition: HMB.h:102
uint32_t Reserved[14]
Definition: HMB.h:103
Definition: HMB.h:9
struct HAL_HMBData::AnalogTriggers AnalogTriggers
struct HAL_HMBData::CounterTimers CounterTimers
struct HAL_HMBData::AveragedAnalogInputs AveragedAnalogInputs
struct HAL_HMBData::EncoderTimers EncoderTimers
struct HAL_HMBData::Accumulator0 Accumulator0
struct HAL_HMBData::Accumulator1 Accumulator1
struct HAL_HMBData::AnalogInputs AnalogInputs
struct HAL_HMBData::Counters Counters
struct HAL_HMBData::RelayDOAO RelayDOAO
struct HAL_HMBData::Timestamp Timestamp
struct HAL_HMBData::DI DI
struct HAL_HMBData::PWM PWM
struct HAL_HMBData::Interrupts Interrupts
struct HAL_HMBData::Encoders Encoders
struct HAL_HMBData::DutyCycle DutyCycle