... | @@ -165,10 +165,17 @@ waits for an available frame and captures it. |
... | @@ -165,10 +165,17 @@ waits for an available frame and captures it. |
|
This function reads the camera data. It is usually executed periodically in the PIT timer and doesn't need to be called.
|
|
This function reads the camera data. It is usually executed periodically in the PIT timer and doesn't need to be called.
|
|
|
|
|
|
### Example
|
|
### Example
|
|
Capture a camera frame:
|
|
Capture a camera frame, check if camera 0 is enabled and iterate through pixels:
|
|
<code>
|
|
<code>
|
|
HDU_LINESCAN_init(50000);
|
|
HDU_LINESCAN_init(50000);
|
|
HDU_LINESCAN_Data frame = HDU_LINESCAN_capture();
|
|
HDU_LINESCAN_Data frame = HDU_LINESCAN_capture();
|
|
|
|
if(frame.cam0En)
|
|
|
|
{
|
|
|
|
for(int i = 0; i < 128; i++)
|
|
|
|
{
|
|
|
|
uint16_t currentPixel = frame.pixels0[i];
|
|
|
|
}
|
|
|
|
}
|
|
</code>
|
|
</code>
|
|
|
|
|
|
## Powertrain control (HDU_POWERTRAIN.h)
|
|
## Powertrain control (HDU_POWERTRAIN.h)
|
... | | ... | |