... | ... | @@ -133,7 +133,7 @@ returns the value of potentiometer A or B from 0 to fff. |
|
|
#### void HDU_HMI_setLEDs(uint8_t value)
|
|
|
shows a 4-bit value on the LEDs.
|
|
|
|
|
|
### Software Example
|
|
|
### Example
|
|
|
Get dipswitches value from the user input struct and decode it to the LEDs:
|
|
|
<code>
|
|
|
HDU_HMI_init();
|
... | ... | @@ -142,7 +142,7 @@ setLEDs(HDU_HMI_userInput.dipswitches); |
|
|
</code>
|
|
|
|
|
|
## Camera reading (HDU_LINESCAN.h)
|
|
|
The HDU_LINESCAN module allows to read the images of one or both linescan cameras. The reading is evaluated in the Periodic Interrupt Timer (PIT).
|
|
|
The HDU_LINESCAN module allows to read the images of one or both linescan cameras synchronously. The reading is evaluated in the Periodic Interrupt Timer (PIT).
|
|
|
|
|
|
### Module documentation
|
|
|
|
... | ... | @@ -150,6 +150,26 @@ The HDU_LINESCAN module allows to read the images of one or both linescan camera |
|
|
This struct stores the raw ADC data of each camera in an array. There is also a boolean telling if a frame is available and one boolean for each camera, which shows if it is enabled.
|
|
|
|
|
|
#### void HDU_LINESCAN_init(uint64_t periodUs)
|
|
|
initializes the cameras and the periodic interrupt timer. The evaluation period can be set in microseconds.
|
|
|
|
|
|
#### void HDU_LINESCAN_enableX()
|
|
|
enables camera 0 or camera 1 to be evaluated.
|
|
|
|
|
|
#### void HDU_LINESCAN_disableX()
|
|
|
disables camera 0 or camera 1 to be not evaluated.
|
|
|
|
|
|
#### HDU_LINESCAN_Data HDU_LINESCAN_capture()
|
|
|
waits for an available frame and captures it.
|
|
|
|
|
|
#### void HDU_LINESCAN_read()
|
|
|
This function reads the camera data. It is usually executed periodically in the PIT timer and doesn't need to be called.
|
|
|
|
|
|
### Example
|
|
|
Capture a camera frame:
|
|
|
<code>
|
|
|
HDU_LINESCAN_init(50000);
|
|
|
HDU_LINESCAN_Data frame = HDU_LINESCAN_capture();
|
|
|
</code>
|
|
|
|
|
|
## Powertrain control (HDU_POWERTRAIN.h)
|
|
|
|
... | ... | |