From ef02221f2a24ee7ddecb315ada13460b5aa4fba4 Mon Sep 17 00:00:00 2001 From: glopesdev Date: Fri, 6 Nov 2026 23:55:18 +0000 Subject: [PATCH] Mark PortDIO output registers as unimplemented The descriptions of the five PortDIO output registers state that the functionality has not yet been implemented, and the generated interfaces and the DIO notes in the articles are updated to match. --- device.yml | 10 +- docs/articles/errors.md | 2 +- docs/articles/read-digital-inputs.md | 2 +- firmware/Behavior/app_ios_and_regs.h | 10 +- .../dotnet/Harp.Behavior/Device.Generated.cs | 103 +++++++++--------- .../src/harp/device/behavior/__init__.py | 10 +- 6 files changed, 71 insertions(+), 66 deletions(-) diff --git a/device.yml b/device.yml index a8c68f1..3946d80 100644 --- a/device.yml +++ b/device.yml @@ -41,23 +41,23 @@ registers: type: U8 access: Write maskType: PortDigitalIOS - description: Set the specified port DIO lines + description: Set the specified port DIO lines. This functionality has not yet been implemented. PortDIOClear: <<: *portDIO address: 39 - description: Clear the specified port DIO lines + description: Clear the specified port DIO lines. This functionality has not yet been implemented. PortDIOToggle: <<: *portDIO address: 40 - description: Toggle the specified port DIO lines + description: Toggle the specified port DIO lines. This functionality has not yet been implemented. PortDIOState: <<: *portDIO address: 41 - description: Write the state of all port DIO lines + description: Write the state of all port DIO lines. This functionality has not yet been implemented. PortDIODirection: <<: *portDIO address: 42 - description: Specifies which of the port DIO lines are outputs + description: Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented. PortDIOStateEvent: <<: *portDIO address: 43 diff --git a/docs/articles/errors.md b/docs/articles/errors.md index 2f38a69..aac65a0 100644 --- a/docs/articles/errors.md +++ b/docs/articles/errors.md @@ -26,7 +26,7 @@ Also check that the ground connection is shared between the devices, as improper **Q: How do I use the DIO pins on the poke ports as digital outputs?** -A: The **DIO** line on ports **P0**–**P2** work only as a digital input in the current firmware (v3.3), as the functionality to switch the pins from digital input to digital output has not been implemented yet. +A: The **DIO** line on ports **P0**–**P2** works only as a digital input, as the functionality to switch the pins from digital input to digital output has not been implemented yet. A **DIO** line can still follow the infrared beam or valve of a poke when it is selected as a mimic output, as described in [Mimic poke signals](mimic-poke-signals.md). [!INCLUDE [](../includes/version-footer.md)] diff --git a/docs/articles/read-digital-inputs.md b/docs/articles/read-digital-inputs.md index b75c4d4..6a96f42 100644 --- a/docs/articles/read-digital-inputs.md +++ b/docs/articles/read-digital-inputs.md @@ -37,7 +37,7 @@ The first value is the payload, listing the digital inputs that are currently ac ## Visualize port DIO events -In the current firmware (v3.3) the **DIO** line acts only as an active-low digital input. It idles high at 5 V through onboard pull-up resistors, and the connected device must actively drive it low. Changes on the **DIO** lines are broadcast in a different register, [`PortDIOStateEvent`], which can be visualized in the same way as the digital inputs: +By default, the **DIO** line acts as an active-low digital input. It idles high at 5 V through onboard pull-up resistors, and the connected device must actively drive it low. Changes on the **DIO** lines are broadcast in a different register, [`PortDIOStateEvent`], which can be visualized in the same way as the digital inputs: :::workflow ![Visualize port DIO events](../workflows/readdigitalinputs-visualizeportdio.bonsai) diff --git a/firmware/Behavior/app_ios_and_regs.h b/firmware/Behavior/app_ios_and_regs.h index a816bd5..5a4a76b 100644 --- a/firmware/Behavior/app_ios_and_regs.h +++ b/firmware/Behavior/app_ios_and_regs.h @@ -227,11 +227,11 @@ typedef struct #define ADD_REG_OUTPUT_CLEAR 35 // U16 Clear the specified digital output lines #define ADD_REG_OUTPUT_TOGGLE 36 // U16 Toggle the specified digital output lines #define ADD_REG_OUTPUT_STATE 37 // U16 Write the state of all digital output lines -#define ADD_REG_PORT_DIO_SET 38 // U8 Set the specified port DIO lines -#define ADD_REG_PORT_DIO_CLEAR 39 // U8 Clear the specified port DIO lines -#define ADD_REG_PORT_DIO_TOGGLE 40 // U8 Toggle the specified port DIO lines -#define ADD_REG_PORT_DIO_STATE 41 // U8 Write the state of all port DIO lines -#define ADD_REG_PORT_DIO_DIRECTION 42 // U8 Specifies which of the port DIO lines are outputs +#define ADD_REG_PORT_DIO_SET 38 // U8 Set the specified port DIO lines. This functionality has not yet been implemented. +#define ADD_REG_PORT_DIO_CLEAR 39 // U8 Clear the specified port DIO lines. This functionality has not yet been implemented. +#define ADD_REG_PORT_DIO_TOGGLE 40 // U8 Toggle the specified port DIO lines. This functionality has not yet been implemented. +#define ADD_REG_PORT_DIO_STATE 41 // U8 Write the state of all port DIO lines. This functionality has not yet been implemented. +#define ADD_REG_PORT_DIO_DIRECTION 42 // U8 Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented. #define ADD_REG_PORT_DIO_STATE_EVENT 43 // U8 Specifies the state of the port DIO lines on a line change #define ADD_REG_ANALOG_DATA 44 // I16 Voltage at the ADC input and encoder value on Port 2 #define ADD_REG_OUTPUT_PULSE_ENABLE 45 // U16 Enables the pulse function for the specified output lines diff --git a/software/dotnet/Harp.Behavior/Device.Generated.cs b/software/dotnet/Harp.Behavior/Device.Generated.cs index bda9250..1ce04de 100644 --- a/software/dotnet/Harp.Behavior/Device.Generated.cs +++ b/software/dotnet/Harp.Behavior/Device.Generated.cs @@ -1448,9 +1448,9 @@ public static Timestamped GetPayload(HarpMessage message) /// /// Provides methods for manipulating PortDIOSet register messages. Set the specified port DIO - /// lines. + /// lines. This functionality has not yet been implemented. /// - [Description("Set the specified port DIO lines.")] + [Description("Set the specified port DIO lines. This functionality has not yet been implemented.")] public partial class PortDIOSet { /// @@ -1522,10 +1522,10 @@ public static HarpMessage FromPayload(double timestamp, MessageType messageType, /// /// Provides methods that return the timestamped payload of PortDIOSet register messages. Set the - /// specified port DIO lines. + /// specified port DIO lines. This functionality has not yet been implemented. /// /// - [Description("Set the specified port DIO lines.")] + [Description("Set the specified port DIO lines. This functionality has not yet been implemented.")] public partial class TimestampedPortDIOSet : ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOSet); @@ -1548,9 +1548,9 @@ public static Timestamped GetPayload(HarpMessage message) /// /// Provides methods for manipulating PortDIOClear register messages. Clear the specified port DIO - /// lines. + /// lines. This functionality has not yet been implemented. /// - [Description("Clear the specified port DIO lines.")] + [Description("Clear the specified port DIO lines. This functionality has not yet been implemented.")] public partial class PortDIOClear { /// @@ -1622,10 +1622,10 @@ public static HarpMessage FromPayload(double timestamp, MessageType messageType, /// /// Provides methods that return the timestamped payload of PortDIOClear register messages. Clear - /// the specified port DIO lines. + /// the specified port DIO lines. This functionality has not yet been implemented. /// /// - [Description("Clear the specified port DIO lines.")] + [Description("Clear the specified port DIO lines. This functionality has not yet been implemented.")] public partial class TimestampedPortDIOClear : ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOClear); @@ -1648,9 +1648,9 @@ public static Timestamped GetPayload(HarpMessage message) /// /// Provides methods for manipulating PortDIOToggle register messages. Toggle the specified port DIO - /// lines. + /// lines. This functionality has not yet been implemented. /// - [Description("Toggle the specified port DIO lines.")] + [Description("Toggle the specified port DIO lines. This functionality has not yet been implemented.")] public partial class PortDIOToggle { /// @@ -1722,10 +1722,10 @@ public static HarpMessage FromPayload(double timestamp, MessageType messageType, /// /// Provides methods that return the timestamped payload of PortDIOToggle register messages. Toggle - /// the specified port DIO lines. + /// the specified port DIO lines. This functionality has not yet been implemented. /// /// - [Description("Toggle the specified port DIO lines.")] + [Description("Toggle the specified port DIO lines. This functionality has not yet been implemented.")] public partial class TimestampedPortDIOToggle : ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOToggle); @@ -1748,9 +1748,9 @@ public static Timestamped GetPayload(HarpMessage message) /// /// Provides methods for manipulating PortDIOState register messages. Write the state of all port - /// DIO lines. + /// DIO lines. This functionality has not yet been implemented. /// - [Description("Write the state of all port DIO lines.")] + [Description("Write the state of all port DIO lines. This functionality has not yet been implemented.")] public partial class PortDIOState { /// @@ -1822,10 +1822,10 @@ public static HarpMessage FromPayload(double timestamp, MessageType messageType, /// /// Provides methods that return the timestamped payload of PortDIOState register messages. Write - /// the state of all port DIO lines. + /// the state of all port DIO lines. This functionality has not yet been implemented. /// /// - [Description("Write the state of all port DIO lines.")] + [Description("Write the state of all port DIO lines. This functionality has not yet been implemented.")] public partial class TimestampedPortDIOState : ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOState); @@ -1848,9 +1848,9 @@ public static Timestamped GetPayload(HarpMessage message) /// /// Provides methods for manipulating PortDIODirection register messages. Specifies which of the - /// port DIO lines are outputs. + /// port DIO lines are outputs. This functionality has not yet been implemented. /// - [Description("Specifies which of the port DIO lines are outputs.")] + [Description("Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented.")] public partial class PortDIODirection { /// @@ -1922,10 +1922,11 @@ public static HarpMessage FromPayload(double timestamp, MessageType messageType, /// /// Provides methods that return the timestamped payload of PortDIODirection register messages. - /// Specifies which of the port DIO lines are outputs. + /// Specifies which of the port DIO lines are outputs. This functionality has not yet been + /// implemented. /// /// - [Description("Specifies which of the port DIO lines are outputs.")] + [Description("Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented.")] public partial class TimestampedPortDIODirection : ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIODirection); @@ -8802,18 +8803,19 @@ public HarpMessage GetMessage(double timestamp, MessageType messageType) /// /// Represents an operator that creates PortDIOSet register messages. Set the specified port DIO - /// lines. + /// lines. This functionality has not yet been implemented. /// [DisplayName("PortDIOSetPayload")] - [Description("Set the specified port DIO lines.")] + [Description("Set the specified port DIO lines. This functionality has not yet been implemented.")] public partial class CreatePortDIOSetPayload : IRegisterPayload { Type IRegisterPayload.RegisterType => typeof(PortDIOSet); /// - /// Gets or sets the value for the PortDIOSet register. Set the specified port DIO lines. + /// Gets or sets the value for the PortDIOSet register. Set the specified port DIO lines. This + /// functionality has not yet been implemented. /// - [Description("Set the specified port DIO lines.")] + [Description("Set the specified port DIO lines. This functionality has not yet been implemented.")] public PortDigitalIOS PortDIOSet { get; set; } /// @@ -8838,10 +8840,10 @@ public HarpMessage GetMessage(MessageType messageType) /// /// Represents an operator that creates timestamped PortDIOSet register messages. Set the specified - /// port DIO lines. + /// port DIO lines. This functionality has not yet been implemented. /// [DisplayName("TimestampedPortDIOSetPayload")] - [Description("Set the specified port DIO lines.")] + [Description("Set the specified port DIO lines. This functionality has not yet been implemented.")] public partial class CreateTimestampedPortDIOSetPayload : CreatePortDIOSetPayload, ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOSet); @@ -8860,18 +8862,19 @@ public HarpMessage GetMessage(double timestamp, MessageType messageType) /// /// Represents an operator that creates PortDIOClear register messages. Clear the specified port DIO - /// lines. + /// lines. This functionality has not yet been implemented. /// [DisplayName("PortDIOClearPayload")] - [Description("Clear the specified port DIO lines.")] + [Description("Clear the specified port DIO lines. This functionality has not yet been implemented.")] public partial class CreatePortDIOClearPayload : IRegisterPayload { Type IRegisterPayload.RegisterType => typeof(PortDIOClear); /// - /// Gets or sets the value for the PortDIOClear register. Clear the specified port DIO lines. + /// Gets or sets the value for the PortDIOClear register. Clear the specified port DIO lines. This + /// functionality has not yet been implemented. /// - [Description("Clear the specified port DIO lines.")] + [Description("Clear the specified port DIO lines. This functionality has not yet been implemented.")] public PortDigitalIOS PortDIOClear { get; set; } /// @@ -8896,10 +8899,10 @@ public HarpMessage GetMessage(MessageType messageType) /// /// Represents an operator that creates timestamped PortDIOClear register messages. Clear the - /// specified port DIO lines. + /// specified port DIO lines. This functionality has not yet been implemented. /// [DisplayName("TimestampedPortDIOClearPayload")] - [Description("Clear the specified port DIO lines.")] + [Description("Clear the specified port DIO lines. This functionality has not yet been implemented.")] public partial class CreateTimestampedPortDIOClearPayload : CreatePortDIOClearPayload, ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOClear); @@ -8918,18 +8921,19 @@ public HarpMessage GetMessage(double timestamp, MessageType messageType) /// /// Represents an operator that creates PortDIOToggle register messages. Toggle the specified port - /// DIO lines. + /// DIO lines. This functionality has not yet been implemented. /// [DisplayName("PortDIOTogglePayload")] - [Description("Toggle the specified port DIO lines.")] + [Description("Toggle the specified port DIO lines. This functionality has not yet been implemented.")] public partial class CreatePortDIOTogglePayload : IRegisterPayload { Type IRegisterPayload.RegisterType => typeof(PortDIOToggle); /// - /// Gets or sets the value for the PortDIOToggle register. Toggle the specified port DIO lines. + /// Gets or sets the value for the PortDIOToggle register. Toggle the specified port DIO lines. This + /// functionality has not yet been implemented. /// - [Description("Toggle the specified port DIO lines.")] + [Description("Toggle the specified port DIO lines. This functionality has not yet been implemented.")] public PortDigitalIOS PortDIOToggle { get; set; } /// @@ -8954,10 +8958,10 @@ public HarpMessage GetMessage(MessageType messageType) /// /// Represents an operator that creates timestamped PortDIOToggle register messages. Toggle the - /// specified port DIO lines. + /// specified port DIO lines. This functionality has not yet been implemented. /// [DisplayName("TimestampedPortDIOTogglePayload")] - [Description("Toggle the specified port DIO lines.")] + [Description("Toggle the specified port DIO lines. This functionality has not yet been implemented.")] public partial class CreateTimestampedPortDIOTogglePayload : CreatePortDIOTogglePayload, ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOToggle); @@ -8976,18 +8980,19 @@ public HarpMessage GetMessage(double timestamp, MessageType messageType) /// /// Represents an operator that creates PortDIOState register messages. Write the state of all port - /// DIO lines. + /// DIO lines. This functionality has not yet been implemented. /// [DisplayName("PortDIOStatePayload")] - [Description("Write the state of all port DIO lines.")] + [Description("Write the state of all port DIO lines. This functionality has not yet been implemented.")] public partial class CreatePortDIOStatePayload : IRegisterPayload { Type IRegisterPayload.RegisterType => typeof(PortDIOState); /// /// Gets or sets the value for the PortDIOState register. Write the state of all port DIO lines. + /// This functionality has not yet been implemented. /// - [Description("Write the state of all port DIO lines.")] + [Description("Write the state of all port DIO lines. This functionality has not yet been implemented.")] public PortDigitalIOS PortDIOState { get; set; } /// @@ -9012,10 +9017,10 @@ public HarpMessage GetMessage(MessageType messageType) /// /// Represents an operator that creates timestamped PortDIOState register messages. Write the state - /// of all port DIO lines. + /// of all port DIO lines. This functionality has not yet been implemented. /// [DisplayName("TimestampedPortDIOStatePayload")] - [Description("Write the state of all port DIO lines.")] + [Description("Write the state of all port DIO lines. This functionality has not yet been implemented.")] public partial class CreateTimestampedPortDIOStatePayload : CreatePortDIOStatePayload, ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIOState); @@ -9034,19 +9039,19 @@ public HarpMessage GetMessage(double timestamp, MessageType messageType) /// /// Represents an operator that creates PortDIODirection register messages. Specifies which of the - /// port DIO lines are outputs. + /// port DIO lines are outputs. This functionality has not yet been implemented. /// [DisplayName("PortDIODirectionPayload")] - [Description("Specifies which of the port DIO lines are outputs.")] + [Description("Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented.")] public partial class CreatePortDIODirectionPayload : IRegisterPayload { Type IRegisterPayload.RegisterType => typeof(PortDIODirection); /// /// Gets or sets the value for the PortDIODirection register. Specifies which of the port DIO lines - /// are outputs. + /// are outputs. This functionality has not yet been implemented. /// - [Description("Specifies which of the port DIO lines are outputs.")] + [Description("Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented.")] public PortDigitalIOS PortDIODirection { get; set; } /// @@ -9071,10 +9076,10 @@ public HarpMessage GetMessage(MessageType messageType) /// /// Represents an operator that creates timestamped PortDIODirection register messages. Specifies - /// which of the port DIO lines are outputs. + /// which of the port DIO lines are outputs. This functionality has not yet been implemented. /// [DisplayName("TimestampedPortDIODirectionPayload")] - [Description("Specifies which of the port DIO lines are outputs.")] + [Description("Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented.")] public partial class CreateTimestampedPortDIODirectionPayload : CreatePortDIODirectionPayload, ITimestampedRegister { Type ITimestampedRegister.RegisterType => typeof(PortDIODirection); diff --git a/software/python/src/harp/device/behavior/__init__.py b/software/python/src/harp/device/behavior/__init__.py index aa64c05..2f46e4c 100644 --- a/software/python/src/harp/device/behavior/__init__.py +++ b/software/python/src/harp/device/behavior/__init__.py @@ -850,7 +850,7 @@ class OutputState(RegisterBase[DigitalOutputs]): class PortDIOSet(RegisterBase[PortDigitalIOS]): - """Set the specified port DIO lines""" + """Set the specified port DIO lines. This functionality has not yet been implemented.""" address: ClassVar[int] = 38 payload_type: ClassVar[PayloadType] = PayloadType.U8 @@ -858,7 +858,7 @@ class PortDIOSet(RegisterBase[PortDigitalIOS]): class PortDIOClear(RegisterBase[PortDigitalIOS]): - """Clear the specified port DIO lines""" + """Clear the specified port DIO lines. This functionality has not yet been implemented.""" address: ClassVar[int] = 39 payload_type: ClassVar[PayloadType] = PayloadType.U8 @@ -866,7 +866,7 @@ class PortDIOClear(RegisterBase[PortDigitalIOS]): class PortDIOToggle(RegisterBase[PortDigitalIOS]): - """Toggle the specified port DIO lines""" + """Toggle the specified port DIO lines. This functionality has not yet been implemented.""" address: ClassVar[int] = 40 payload_type: ClassVar[PayloadType] = PayloadType.U8 @@ -874,7 +874,7 @@ class PortDIOToggle(RegisterBase[PortDigitalIOS]): class PortDIOState(RegisterBase[PortDigitalIOS]): - """Write the state of all port DIO lines""" + """Write the state of all port DIO lines. This functionality has not yet been implemented.""" address: ClassVar[int] = 41 payload_type: ClassVar[PayloadType] = PayloadType.U8 @@ -882,7 +882,7 @@ class PortDIOState(RegisterBase[PortDigitalIOS]): class PortDIODirection(RegisterBase[PortDigitalIOS]): - """Specifies which of the port DIO lines are outputs""" + """Specifies which of the port DIO lines are outputs. This functionality has not yet been implemented.""" address: ClassVar[int] = 42 payload_type: ClassVar[PayloadType] = PayloadType.U8