@@ -143,6 +143,35 @@ class UnbufferedSerial:
143143 return 0 ;
144144 }
145145
146+ /* * Enable or disable input
147+ *
148+ * Control enabling of device for input. This is primarily intended
149+ * for temporary power-saving; the overall ability of the device to operate
150+ * for input and/or output may be fixed at creation time, but this call can
151+ * allow input to be temporarily disabled to permit power saving without
152+ * losing device state.
153+ *
154+ * @param enabled true to enable input, false to disable.
155+ *
156+ * @return 0 on success
157+ * @return Negative error code on failure
158+ */
159+ int enable_input (bool enabled) override ;
160+
161+ /* * Enable or disable output
162+ *
163+ * Control enabling of device for output. This is primarily intended
164+ * for temporary power-saving; the overall ability of the device to operate
165+ * for input and/or output may be fixed at creation time, but this call can
166+ * allow output to be temporarily disabled to permit power saving without
167+ * losing device state.
168+ *
169+ * @param enabled true to enable output, false to disable.
170+ *
171+ * @return 0 on success
172+ * @return Negative error code on failure
173+ */
174+ int enable_output (bool enabled) override ;
146175
147176 /* * Check for poll event flags
148177 * Check the events listed in events to see if data can be read or written
@@ -155,14 +184,14 @@ class UnbufferedSerial:
155184 */
156185 short poll (short events) const override ;
157186
158- using SerialBase::readable;
159- using SerialBase::writeable;
160- using SerialBase::format;
161187 using SerialBase::attach;
162188 using SerialBase::baud;
189+ using SerialBase::format;
190+ using SerialBase::readable;
191+ using SerialBase::writeable;
192+ using SerialBase::IrqCnt;
163193 using SerialBase::RxIrq;
164194 using SerialBase::TxIrq;
165- using SerialBase::IrqCnt;
166195
167196#if DEVICE_SERIAL_FC
168197 // For now use the base enum - but in future we may have extra options
0 commit comments