mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Switches SPI and I2C to use enums in the HAL for ports (#531)
Closes #397
This commit is contained in:
committed by
Peter Johnson
parent
67d62ba164
commit
b2f3479692
@@ -20,7 +20,7 @@ using namespace frc;
|
||||
* @param deviceAddress The address of the device on the I2C bus.
|
||||
*/
|
||||
I2C::I2C(Port port, int deviceAddress)
|
||||
: m_port(port), m_deviceAddress(deviceAddress) {
|
||||
: m_port(static_cast<HAL_I2CPort>(port)), m_deviceAddress(deviceAddress) {
|
||||
int32_t status = 0;
|
||||
HAL_InitializeI2C(m_port, &status);
|
||||
// wpi_setErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
|
||||
Reference in New Issue
Block a user