Members
Descriptions
class
AnalogInClass
Class for the Analog IN connector of the Portenta Machine Control.
class
AnalogOutClass
Class for the Analog OUT connector of the Portenta Machine Control.
class
CANCommClass
Class for managing the CAN Bus communication protocol of the Portenta Machine Control.
class
DigitalOutputsClass
Class for the Digital Output connector of the Portenta Machine Control.
class
EncoderClass
Class for the encoder module of the Portenta Machine Control.
class
ProgrammableDINClass
Class for the Programmable Digital Input connector of the Portenta Machine Control.
class
ProgrammableDIOClass
Class for the Programmable Digital IO connector of the Portenta Machine Control.
class
RS485CommClass
Class for managing the RS485 and RS232 communication protocols of the Portenta Machine Control.
class
RTDTempProbeClass
Class for managing the Resistance Temperature Detector (RTD) temperature sensor connector of the Portenta Machine Control.
class
RtcControllerClass
Class for controlling the PCF8563T RTC of the Portenta Machine Control.
class
TCTempProbeClass
Class for managing the Thermocouple (TC) temperature sensor connector of the Portenta Machine Control.
class
USBClass
Class for managing the USB functionality of the Portenta Machine Control.
Class for the Analog IN connector of the Portenta Machine Control.
Members
Descriptions
public
AnalogInClass
(PinName ai0_pin, PinName ai1_pin, PinName ai2_pin)
Construct an Analog Input reader for the Portenta Machine Control.
public
~AnalogInClass
()
Destruct the AnalogInClass object.
public bool
begin
(SensorType sensor_type, int res_bits)
Initialize the analog reader, configure the sensor type and read resolution.
public uint16_t
read
(int channel)
Read the sampled voltage from the selected channel.
Class for the Analog OUT connector of the Portenta Machine Control.
Members
Descriptions
public
AnalogOutClass
(PinName ao0_pin, PinName ao1_pin, PinName ao2_pin, PinName ao3_pin)
Construct an Analog Output writer for the Portenta Machine Control.
public
~AnalogOutClass
()
Destruct the AnalogOutClass object.
public bool
begin
()
Initialize the PWM, configure the default frequency for all channels (500Hz).
public void
setPeriod
(int channel, uint8_t period_ms)
Set the PWM period (frequency) on the selected channel.
public void
write
(int channel, float voltage)
Set output voltage value on the selected channel.
Class for managing the CAN Bus communication protocol of the Portenta Machine Control.
Members
Descriptions
public
CANCommClass
(PinName can_tx_pin, PinName can_rx_pin, PinName can_stb_pin)
Construct a CANCommClass object.
public
~CANCommClass
()
Destruct the CANCommClass object.
public bool
begin
(CanBitRate can_bitrate)
Begin the CAN communication protocol.
public int
write
(CanMsg const & msg)
Write a CAN message to the bus.
public size_t
available
()
Check the number of available CAN messages in the receive buffer.
public CanMsg
read
()
Read a CAN message from the bus.
public void
end
()
Close the CAN communication protocol.
class DigitalOutputsClass
Class for the Digital Output connector of the Portenta Machine Control.
Members
Descriptions
public
DigitalOutputsClass
(PinName do0_pin, PinName do1_pin, PinName do2_pin, PinName do3_pin, PinName do4_pin, PinName do5_pin, PinName do6_pin, PinName do7_pin, PinName latch_pin)
Construct a DigitalOutputsClass object.
public
~DigitalOutputsClass
()
Destruct the DigitalOutputsClass object.
public bool
begin
(bool latch_mode = true)
Initialize the DigitalOutputs module with the specified latch mode.
public void
write
(uint8_t channel, PinStatus val)
Write the output value for the given channel.
public void
writeAll
(uint8_t val_mask)
Set the state of all digital outputs simultaneously.
Class for managing Quadrature Encoder Interface devices of the Portenta Machine Control.
Members
Descriptions
public
EncoderClass
(PinName enc0_a_pin, PinName enc0_b_pin, PinName enc0_i_pin, PinName enc1_a_pin, PinName enc1_b_pin, PinName enc1_i_pin)
Construct an EncoderClass object.
public
~EncoderClass
()
Destruct the EncoderClass object.
public void
reset
(int channel)
Reset the encoder counter for the specified channel.
public int
getCurrentState
(int channel)
Get the current state of the specified encoder channel.
public int
getPulses
(int channel)
Get the number of pulses counted by the specified encoder channel.
public int
getRevolutions
(int channel)
Get the number of revolutions counted by the specified encoder channel.
class ProgrammableDINClass
Class for the Programmable Digital Input connector of the Portenta Machine Control.
class ProgrammableDIOClass
Class for the Programmable Digital IO connector of the Portenta Machine Control.
Members
Descriptions
public
ProgrammableDIOClass
(PinName latch_pin)
Construct a ProgrammableDIOClass object.
public
~ProgrammableDIOClass
()
Destruct the ProgrammableDIOClass object.
public bool
begin
(bool latch_mode)
Initialize the ProgrammableDIO module with the specified latch mode.
Class for managing the RS485 and RS232 communication protocols of the Portenta Machine Control.
Members
Descriptions
public
RS485CommClass
(arduino::UART& uart_itf, PinName rs_tx_pin, PinName rs_de_pin, PinName rs_re_pin)
Construct a RS485CommClass object.
public
~RS485CommClass
()
Destruct the RS485CommClass object.
public void
begin
(unsigned long baudrate, int predelay, int postdelay)
Begin the RS485 communication protocol.
public void
end
()
Close the RS485 communication protocol.
public void
setModeRS232
(bool enable)
Set RS485 mode to RS232.
public void
setYZTerm
(bool enable)
Set YZ termination for RS485 communication.
public void
setABTerm
(bool enable)
Set AB termination for RS485 communication.
public void
setSlew
(bool enable)
Set the slew rate for RS485 communication.
public void
setFullDuplex
(bool enable)
Set RS485 communication to Full Duplex mode.
Class for managing RTD temperature sensor inputs of the Portenta Machine Control.
Members
Descriptions
public
RTDTempProbeClass
(PinName rtd_cs_pin, PinName ch_sel0_pin, PinName ch_sel1_pin, PinName ch_sel2_pin, PinName rtd_th_pin)
Construct a RTDTempProbeClass object.
public
~RTDTempProbeClass
()
Destruct the RTDTempProbeClass object.
public bool
begin
(uint8_t io_address)
Initialize the RTDTempProbeClass with the specified I/O address.
public void
end
()
Disable the temperature sensors and release any resources.
public void
selectChannel
(int channel)
Select the input channel to be read (3 channels available).
Class for controlling the PCF8563T RTC.
Members
Descriptions
public
RtcControllerClass
(PinName int_pin)
Construct a RtcControllerClass object with an interrupt pin.
public
~RtcControllerClass
()
Destructor for the RtcControllerClass.
Class for managing thermocouples temperature sensor of the Portenta Machine Control.
Members
Descriptions
public
TCTempProbeClass
(PinName tc_cs_pin, PinName ch_sel0_pin, PinName ch_sel1_pin, PinName ch_sel2_pin)
Construct a TCTempProbeClass object.
public
~TCTempProbeClass
()
Destruct the TCTempProbeClass object.
public bool
begin
()
Initialize the TCTempProbeClass.
public void
end
()
Disable the temperature sensors and release any resources.
public void
selectChannel
(int channel)
Select the input channel to be read (3 channels available).
Class for managing the USB functionality of the Portenta Machine Control.
Members
Descriptions
public
USBClass
(PinName power_pin, PinName usbflag_pin)
Construct a USBClass object.
public
~USBClass
()
Destruct the USBClass object.
public bool
begin
()
Begin the USB functionality.
public void
end
()
End the USB functionality.
public bool
getFaultStatus
()
Get the fault status of the USBA VBUS.