Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit 26bdb2a

Browse files
doc: update API.md
1 parent 83e97e3 commit 26bdb2a

File tree

1 file changed

+171
-0
lines changed

1 file changed

+171
-0
lines changed

Diff for: docs/api.md

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Summary
2+
3+
Members | Descriptions
4+
--------------------------------------------|------------------------------------------
5+
`class` [`AnalogInClass`](#class-analoginclass) | Class for the Analog IN connector of the Portenta Machine Control.
6+
`class` [`AnalogOutClass`](#class-analogoutclass) | Class for the Analog OUT connector of the Portenta Machine Control.
7+
`class` [`CANCommClass`](#class-cancommclass) | Class for managing the CAN Bus communication protocol of the Portenta Machine Control.
8+
`class` [`DigitalOutputsClass`](#class-digitaloutputsclass) | Class for the Digital Output connector of the Portenta Machine Control.
9+
`class` [`EncoderClass`](#class-encoderclass) | Class for the encoder module of the Portenta Machine Control.
10+
`class` [`ProgrammableDINClass`](#class-programmabledinclass) | Class for the Programmable Digital Input connector of the Portenta Machine Control.
11+
`class` [`ProgrammableDIOClass`](#class-programmabledioclass) | Class for the Programmable Digital IO connector of the Portenta Machine Control.
12+
`class` [`RS485CommClass`](#class-rs485commclass) | Class for managing the RS485 and RS232 communication protocols of the Portenta Machine Control.
13+
`class` [`RTDTempProbeClass`](#class-rtdtempprobeclass) | Class for managing the Resistance Temperature Detector (RTD) temperature sensor connector of the Portenta Machine Control.
14+
`class` [`RtcControllerClass`](#class-rtccontrollerclass) | Class for controlling the PCF8563T RTC of the Portenta Machine Control.
15+
`class` [`TCTempProbeClass`](#class-tctempprobeclass) | Class for managing the Thermocouple (TC) temperature sensor connector of the Portenta Machine Control.
16+
`class` [`USBClass`](#class-usbclass) | Class for managing the USB functionality of the Portenta Machine Control.
17+
18+
# class `AnalogInClass`
19+
Class for the Analog IN connector of the Portenta Machine Control.
20+
21+
## Summary
22+
23+
Members | Descriptions
24+
--------------------------------|---------------------------------------------
25+
`public ` [`AnalogInClass`](#public-analoginclasspinname-ai0_pin--mc_ai_ai0_pin-pinname-ai1_pin--mc_ai_ai1_pin-pinname-ai2_pin--mc_ai_ai2_pin)`(PinName ai0_pin, PinName ai1_pin, PinName ai2_pin)` | Construct an Analog Input reader for the Portenta Machine Control.
26+
`public ` [`~AnalogInClass`](#public-analoginclass)`()` | Destruct the AnalogInClass object.
27+
`public bool` [`begin`](#public-bool-beginint-sensor_type-int-res_bits--16)`(int sensor_type, int res_bits)` | Initialize the analog reader, configure the sensor type and read resolution.
28+
`public uint16_t` [`read`](#public-uint16_t-readint-channel)`(int channel)` | Read the sampled voltage from the selected channel.
29+
30+
# class `AnalogOutClass`
31+
Class for the Analog OUT connector of the Portenta Machine Control.
32+
33+
## Summary
34+
35+
Members | Descriptions
36+
--------------------------------|---------------------------------------------
37+
`public ` [`AnalogOutClass`](#public-analogoutclasspinname-ao0_pin--mc_ao_ao0_pin-pinname-ao1_pin--mc_ao_ao1_pin-pinname-ao2_pin--mc_ao_ao2_pin-pinname-ao3_pin--mc_ao_ao3_pin)`(PinName ao0_pin, PinName ao1_pin, PinName ao2_pin, PinName ao3_pin)` | Construct an Analog Output writer for the Portenta Machine Control.
38+
`public ` [`~AnalogOutClass`](#public-analogoutclass)`()` | Destruct the AnalogOutClass object.
39+
`public bool` [`begin`](#public-bool-begin)`()` | Initialize the PWM, configure the default frequency for all channels (500Hz).
40+
`public void` [`setPeriod`](#public-void-setperiodint-channel-uint8_t-period_ms)`(int channel, uint8_t period_ms)` | Set the PWM period (frequency) on the selected channel.
41+
`public void` [`write`](#public-void-writeint-channel-float-voltage)`(int channel, float voltage)` | Set output voltage value on the selected channel.
42+
43+
# class `CANCommClass`
44+
Class for managing the CAN Bus communication protocol of the Portenta Machine Control.
45+
46+
## Summary
47+
48+
Members | Descriptions
49+
--------------------------------|---------------------------------------------
50+
`public ` [`CANCommClass`](#public-cancommclasspinname-can_tx_pin--mc_can_tx_pin-pinname-can_rx_pin--mc_can_rx_pin-pinname-can_stb_pin--mc_can_stb_pin)`(PinName can_tx_pin, PinName can_rx_pin, PinName can_stb_pin)` | Construct a CANCommClass object.
51+
`public ` [`~CANCommClass`](#public-cancommclass)`()` | Destruct the CANCommClass object.
52+
`public bool` [`begin`](#public-bool-begincanbitrate-can_bitrate)`(CanBitRate can_bitrate)` | Begin the CAN communication protocol.
53+
`public int` [`write`](#public-int-writecanmsg-const--msg)`(CanMsg const & msg)` | Write a CAN message to the bus.
54+
`public size_t` [`available`](#public-size_t-available)`()` | Check the number of available CAN messages in the receive buffer.
55+
`public CanMsg` [`read`](#public-canmsg-read)`()` | Read a CAN message from the bus.
56+
`public void` [`end`](#public-void-end)`()` | Close the CAN communication protocol.
57+
58+
# class `DigitalOutputsClass`
59+
Class for the Digital Output connector of the Portenta Machine Control.
60+
61+
## Summary
62+
63+
Members | Descriptions
64+
--------------------------------|---------------------------------------------
65+
`public ` [`DigitalOutputsClass`](#public-digitaloutputsclasspinname-do0_pin--mc_do_do0_pin-pinname-do1_pin--mc_do_do1_pin-pinname-do2_pin--mc_do_do2_pin-pinname-do3_pin--mc_do_do3_pin-pinname-do4_pin--mc_do_do4_pin-pinname-do5_pin--mc_do_do5_pin-pinname-do6_pin--mc_do_do6_pin-pinname-do7_pin--mc_do_do7_pin-pinname-latch_pin--mc_do_latch_pin)`(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.
66+
`public ` [`~DigitalOutputsClass`](#public-digitaloutputsclass)`()` | Destruct the DigitalOutputsClass object.
67+
`public bool` [`begin`](#public-bool-beginbool-latch_mode--true)`(bool latch_mode = true)` | Initialize the DigitalOutputs module with the specified latch mode.
68+
`public void` [`write`](#public-void-writeuint8_t-channel-pinstatus-val)`(uint8_t channel, PinStatus val)` | Write the output value for the given channel.
69+
`public void` [`writeAll`](#public-void-writealluint8_t-val_mask)`(uint8_t val_mask)` | Set the state of all digital outputs simultaneously.
70+
71+
# class `EncoderClass`
72+
Class for managing Quadrature Encoder Interface devices of the Portenta Machine Control.
73+
74+
## Summary
75+
76+
Members | Descriptions
77+
--------------------------------|---------------------------------------------
78+
`public ` [`EncoderClass`](#public-encoderclasspinname-enc0_a_pin--mc_enc_0a_pin-pinname-enc0_b_pin--mc_enc_0b_pin-pinname-enc0_i_pin--mc_enc_0i_pin-pinname-enc1_a_pin--mc_enc_1a_pin-pinname-enc1_b_pin--mc_enc_1b_pin-pinname-enc1_i_pin--mc_enc_1i_pin)`(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.
79+
`public ` [`~EncoderClass`](#public-encoderclass)`()` | Destruct the EncoderClass object.
80+
`public void` [`reset`](#public-void-resetint-channel)`(int channel)` | Reset the encoder counter for the specified channel.
81+
`public int` [`getCurrentState`](#public-int-getcurrentstateint-channel)`(int channel)` | Get the current state of the specified encoder channel.
82+
`public int` [`getPulses`](#public-int-getpulsesint-channel)`(int channel)` | Get the number of pulses counted by the specified encoder channel.
83+
`public int` [`getRevolutions`](#public-int-getrevolutionsint-channel)`(int channel)` | Get the number of revolutions counted by the specified encoder channel.
84+
85+
# class `ProgrammableDINClass`
86+
Class for the Programmable Digital Input connector of the Portenta Machine Control.
87+
88+
## Summary
89+
90+
Members | Descriptions
91+
--------------------------------|---------------------------------------------
92+
`public ` [`ProgrammableDINClass`](#public-programmabledinclass)`()` | Construct a ProgrammableDINClass object.
93+
`public ` [`~ProgrammableDINClass`](#public-programmabledinclass)`()` | Destruct the ProgrammableDINClass object.
94+
`public bool` [`begin`](#public-bool-begin)`()` | Initialize the ProgrammableDIN module.
95+
96+
# class `ProgrammableDIOClass`
97+
Class for the Programmable Digital IO connector of the Portenta Machine Control.
98+
99+
## Summary
100+
101+
Members | Descriptions
102+
--------------------------------|---------------------------------------------
103+
`public ` [`ProgrammableDIOClass`](#public-programmabledioclasspinname-latch_pin--mc_pdio_latch_pin-pinname-latch_pin)`(PinName latch_pin)` | Construct a ProgrammableDIOClass object.
104+
`public ` [`~ProgrammableDIOClass`](#public-programmabledioclass)`()` | Destruct the ProgrammableDIOClass object.
105+
`public bool` [`begin`](#public-bool-beginbool-latch_mode--true)`(bool latch_mode)` | Initialize the ProgrammableDIO module with the specified latch mode.
106+
107+
# class `RS485CommClass`
108+
Class for managing the RS485 and RS232 communication protocols of the Portenta Machine Control.
109+
110+
## Summary
111+
112+
Members | Descriptions
113+
--------------------------------|---------------------------------------------
114+
`public ` [`RS485CommClass`](#public-rs485commclassarduino::uart--uart_itf-pinname-rs_tx_pin--mc_rs485_tx_pin-pinname-rs_de_pin--mc_rs485_de_pin-pinname-rs_re_pin--mc_rs485_re_pin)`(arduino::UART& uart_itf, PinName rs_tx_pin, PinName rs_de_pin, PinName rs_re_pin)` | Construct a RS485CommClass object.
115+
`public ` [`~RS485CommClass`](#public-rs485commclass)`()` | Destruct the RS485CommClass object.
116+
`public void` [`begin`](#public-void-beginunsigned-long-baudrate--115200-int-predelay--rs485_default_pre_delay-int-postdelay--rs485_default_post_delay)`(unsigned long baudrate, int predelay, int postdelay)` | Begin the RS485 communication protocol.
117+
`public void` [`end`](#public-void-end)`()` | Close the RS485 communication protocol.
118+
`public void` [`setModeRS232`](#public-void-setmoders232bool-enable)`(bool enable)` | Set RS485 mode to RS232.
119+
`public void` [`setYZTerm`](#public-void-setyztermbool-enable)`(bool enable)` | Set YZ termination for RS485 communication.
120+
`public void` [`setABTerm`](#public-void-setabtermbool-enable)`(bool enable)` | Set AB termination for RS485 communication.
121+
`public void` [`setSlew`](#public-void-setslewbool-enable)`(bool enable)` | Set the slew rate for RS485 communication.
122+
`public void` [`setFullDuplex`](#public-void-setfullduplexbool-enable)`(bool enable)` | Set RS485 communication to Full Duplex mode.
123+
124+
# class `RTDTempProbeClass`
125+
Class for managing RTD temperature sensor inputs of the Portenta Machine Control.
126+
127+
## Summary
128+
129+
Members | Descriptions
130+
--------------------------------|---------------------------------------------
131+
`public ` [`RTDTempProbeClass`](#public-rtdtempprobeclasspinname-rtd_cs_pin--mc_rtd_cs_pin-pinname-ch_sel0_pin--mc_rtd_sel0_pin-pinname-ch_sel1_pin--mc_rtd_sel1_pin-pinname-ch_sel2_pin--mc_rtd_sel2_pin-pinname-rtd_th_pin--mc_rtd_th_pin)`(PinName rtd_cs_pin, PinName ch_sel0_pin, PinName ch_sel1_pin, PinName ch_sel2_pin, PinName rtd_th_pin)` | Construct a RTDTempProbeClass object.
132+
`public ` [`~RTDTempProbeClass`](#public-rtdtempprobeclass)`()` | Destruct the RTDTempProbeClass object.
133+
`public bool` [`begin`](#public-bool-beginuint8_t-io_address--three_wire)`(uint8_t io_address)` | Initialize the RTDTempProbeClass with the specified I/O address.
134+
`public void` [`end`](#public-void-end)`()` | Disable the temperature sensors and release any resources.
135+
`public void` [`selectChannel`](#public-void-selectchannelint-channel)`(int channel)` | Select the input channel to be read (3 channels available).
136+
137+
# class `RtcControllerClass`
138+
Class for controlling the PCF8563T RTC.
139+
140+
## Summary
141+
142+
Members | Descriptions
143+
--------------------------------|---------------------------------------------
144+
`public ` [`RtcControllerClass`](#public-rtccontrollerclasspinname-int_pin--mc_rtc_int_pin)`(PinName int_pin)` | Construct a RtcControllerClass object with an interrupt pin.
145+
`public ` [`~RtcControllerClass`](#public-rtccontrollerclass)`()` | Destructor for the RtcControllerClass.
146+
147+
# class `TCTempProbeClass`
148+
Class for managing thermocouples temperature sensor of the Portenta Machine Control.
149+
150+
## Summary
151+
152+
Members | Descriptions
153+
--------------------------------|---------------------------------------------
154+
`public ` [`TCTempProbeClass`](#public-tctempprobeclasspinname-tc_cs_pin--mc_tc_cs_pin-pinname-ch_sel0_pin--mc_tc_sel0_pin-pinname-ch_sel1_pin--mc_tc_sel1_pin-pinname-ch_sel2_pin--mc_tc_sel2_pin)`(PinName tc_cs_pin, PinName ch_sel0_pin, PinName ch_sel1_pin, PinName ch_sel2_pin)` | Construct a TCTempProbeClass object.
155+
`public ` [`~TCTempProbeClass`](#public-tctempprobeclass)`()` | Destruct the TCTempProbeClass object.
156+
`public bool` [`begin`](#public-bool-begin)`()` | Initialize the TCTempProbeClass.
157+
`public void` [`end`](#public-void-end)`()` | Disable the temperature sensors and release any resources.
158+
`public void` [`selectChannel`](#public-void-selectchannelint-channel)`(int channel)` | Select the input channel to be read (3 channels available).
159+
160+
# class `USBClass`
161+
Class for managing the USB functionality of the Portenta Machine Control.
162+
163+
## Summary
164+
165+
Members | Descriptions
166+
--------------------------------|---------------------------------------------
167+
`public ` [`USBClass`](#public-usbclasspinname-power_pin--mc_usb_pwr_pin-pinname-usbflag_pin--mc_usb_flag_pin)`(PinName power_pin, PinName usbflag_pin)` | Construct a USBClass object.
168+
`public ` [`~USBClass`](#public-usbclass)`()` | Destruct the USBClass object.
169+
`public bool` [`begin`](#public-bool-begin)`()` | Begin the USB functionality.
170+
`public void` [`end`](#public-void-end)`()` | End the USB functionality.
171+
`public bool` [`getFaultStatus`](#public-bool-getfaultstatus)`()` | Get the fault status of the USBA VBUS.

0 commit comments

Comments
 (0)