Skip to content

Commit 0fc8c1c

Browse files
authored
Merge pull request #211 from robotpy/unwrap-hal
Don't bind most HAL functions/types by default
2 parents 4bfe4f7 + 90360a9 commit 0fc8c1c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+54
-1475
lines changed

subprojects/robotpy-hal/pyproject.toml

Lines changed: 5 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,12 @@ packages = ["hal"]
3838

3939
[tool.semiwrap]
4040
update_init = []
41+
42+
# NOTE: By default we ignore all HAL APIs, as most of them are exposed in WPILib
43+
# somewhere. If you find something that you need, file a bug and we can add it!
44+
4145
scan_headers_ignore = [
42-
"hal/ChipObject.h",
43-
"hal/DMA.h",
44-
"hal/Errors.h",
45-
"hal/HAL.h",
46-
"hal/UsageReporting.h",
47-
"hal/Types.h",
48-
"hal/Value.h",
49-
50-
"hal/cpp/SerialHelper.h",
51-
"hal/cpp/UnsafeDIO.h",
52-
"hal/cpp/fpga_clock.h",
53-
54-
"hal/handles/DigitalHandleResource.h",
55-
"hal/handles/IndexedClassedHandleResource.h",
56-
"hal/handles/IndexedHandleResource.h",
57-
"hal/handles/LimitedClassedHandleResource.h",
58-
"hal/handles/LimitedHandleResource.h",
59-
"hal/handles/UnlimitedHandleResource.h",
60-
61-
"hal/roborio/HMB.h",
62-
"hal/roborio/InterruptManager.h",
63-
64-
"hal/simulation/CanData.h",
65-
"hal/simulation/I2CData.h",
66-
"hal/simulation/NotifyListener.h",
67-
"hal/simulation/SPIData.h",
68-
"hal/simulation/SimCallbackRegistry.h",
69-
"hal/simulation/SimDataValue.h",
46+
"hal/*",
7047

7148
"sim_cb.h",
7249
"sim_value_cb.h",
@@ -80,69 +57,22 @@ depends = ["wpiutil"]
8057
[tool.semiwrap.extension_modules."hal._wpiHal".headers]
8158
# hal
8259
Accelerometer = "hal/Accelerometer.h"
83-
AddressableLED = "hal/AddressableLED.h"
84-
AddressableLEDTypes = "hal/AddressableLEDTypes.h"
85-
AnalogAccumulator = "hal/AnalogAccumulator.h"
86-
AnalogGyro = "hal/AnalogGyro.h"
87-
AnalogInput = "hal/AnalogInput.h"
88-
AnalogOutput = "hal/AnalogOutput.h"
89-
AnalogTrigger = "hal/AnalogTrigger.h"
90-
CAN = "hal/CAN.h"
91-
CANAPI = "hal/CANAPI.h"
9260
CANAPITypes = "hal/CANAPITypes.h"
93-
CTREPCM = "hal/CTREPCM.h"
94-
# ChipObject = "hal/ChipObject.h"
95-
Constants = "hal/Constants.h"
96-
Counter = "hal/Counter.h"
97-
DIO = "hal/DIO.h"
98-
# DMA = "hal/DMA.h"
9961
DriverStation = "hal/DriverStation.h"
10062
DriverStationTypes = "hal/DriverStationTypes.h"
101-
DutyCycle = "hal/DutyCycle.h"
102-
Encoder = "hal/Encoder.h"
103-
# Errors = "hal/Errors.h"
10463
Extensions = "hal/Extensions.h"
10564
FRCUsageReporting = "hal/FRCUsageReporting.h"
106-
# HAL = "hal/HAL.h"
10765
HALBase = "hal/HALBase.h"
108-
I2C = "hal/I2C.h"
109-
I2CTypes = "hal/I2CTypes.h"
110-
Interrupts = "hal/Interrupts.h"
111-
LEDs = "hal/LEDs.h"
11266
Main = "hal/Main.h"
11367
Notifier = "hal/Notifier.h"
114-
PWM = "hal/PWM.h"
115-
Ports = "hal/Ports.h"
116-
Power = "hal/Power.h"
117-
PowerDistribution = "hal/PowerDistribution.h"
118-
REVPH = "hal/REVPH.h"
119-
Relay = "hal/Relay.h"
120-
SPI = "hal/SPI.h"
12168
SPITypes = "hal/SPITypes.h"
122-
SerialPort = "hal/SerialPort.h"
12369
SimDevice = "hal/SimDevice.h"
12470
Threads = "hal/Threads.h"
12571
# Types = "hal/Types.h"
12672
# Value = "hal/Value.h"
12773

12874
# hal/cpp
12975
SerialHelper = { header="hal/cpp/SerialHelper.h", enable_if="platform_machine == 'roborio'" }
130-
# UnsafeDIO = "hal/cpp/UnsafeDIO.h"
131-
# fpga_clock = "hal/cpp/fpga_clock.h"
132-
133-
# hal/handles
134-
# DigitalHandleResource = "hal/handles/DigitalHandleResource.h"
135-
HandlesInternal = "hal/handles/HandlesInternal.h"
136-
# IndexedClassedHandleResource = "hal/handles/IndexedClassedHandleResource.h"
137-
# IndexedHandleResource = "hal/handles/IndexedHandleResource.h"
138-
# LimitedClassedHandleResource = "hal/handles/LimitedClassedHandleResource.h"
139-
# LimitedHandleResource = "hal/handles/LimitedHandleResource.h"
140-
# UnlimitedHandleResource = "hal/handles/UnlimitedHandleResource.h"
141-
142-
# hal/roborio
143-
# HMB = "hal/roborio/HMB.h"
144-
# InterruptManager = "hal/roborio/InterruptManager.h"
145-
14676

14777
[tool.semiwrap.extension_modules."hal.simulation._simulation"]
14878
name = "hal_simulation"
@@ -151,31 +81,8 @@ depends = ["wpiutil"]
15181
yaml_path = "semiwrap/simulation"
15282

15383
[tool.semiwrap.extension_modules."hal.simulation._simulation".headers]
154-
AccelerometerData = "hal/simulation/AccelerometerData.h"
155-
AddressableLEDData = "hal/simulation/AddressableLEDData.h"
156-
AnalogGyroData = "hal/simulation/AnalogGyroData.h"
157-
AnalogInData = "hal/simulation/AnalogInData.h"
158-
AnalogOutData = "hal/simulation/AnalogOutData.h"
159-
AnalogTriggerData = "hal/simulation/AnalogTriggerData.h"
160-
CTREPCMData = "hal/simulation/CTREPCMData.h"
161-
# CanData = "hal/simulation/CanData.h"
162-
DIOData = "hal/simulation/DIOData.h"
163-
DigitalPWMData = "hal/simulation/DigitalPWMData.h"
16484
DriverStationData = "hal/simulation/DriverStationData.h"
165-
DutyCycleData = "hal/simulation/DutyCycleData.h"
166-
EncoderData = "hal/simulation/EncoderData.h"
167-
# I2CData = "hal/simulation/I2CData.h"
16885
MockHooks = "hal/simulation/MockHooks.h"
16986
NotifierData = "hal/simulation/NotifierData.h"
170-
# NotifyListener = "hal/simulation/NotifyListener.h"
171-
PWMData = "hal/simulation/PWMData.h"
172-
PowerDistributionData = "hal/simulation/PowerDistributionData.h"
173-
REVPHData = "hal/simulation/REVPHData.h"
174-
RelayData = "hal/simulation/RelayData.h"
17587
Reset = "hal/simulation/Reset.h"
176-
RoboRioData = "hal/simulation/RoboRioData.h"
177-
SPIAccelerometerData = "hal/simulation/SPIAccelerometerData.h"
178-
# SPIData = "hal/simulation/SPIData.h"
179-
# SimCallbackRegistry = "hal/simulation/SimCallbackRegistry.h"
180-
# SimDataValue = "hal/simulation/SimDataValue.h"
18188
SimDeviceData = "hal/simulation/SimDeviceData.h"

subprojects/robotpy-hal/semiwrap/AddressableLED.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/AddressableLEDTypes.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/AnalogAccumulator.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/AnalogGyro.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/AnalogInput.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/AnalogOutput.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/AnalogTrigger.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/CAN.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

subprojects/robotpy-hal/semiwrap/CANAPI.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)