CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
camera_init.h File Reference
#include <stdint.h>
Include dependency graph for camera_init.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t CAM_change_baudrate (uint32_t bitrate)
 Changes the baudrate of the camera by sending it a UART command, and then changing the baudrate of the camera UART port.
 
uint8_t CAM_setup ()
 Set up the camera by powering on and changing the baudrate to 230400.
 
uint8_t CAM_test ()
 Send the 't' test command to the camera, and check if the response is valid.
 

Function Documentation

◆ CAM_change_baudrate()

uint8_t CAM_change_baudrate ( uint32_t new_baud_rate)

Changes the baudrate of the camera by sending it a UART command, and then changing the baudrate of the camera UART port.

Parameters
new_baud_rateThe new baud rate to set the camera to. Ranges from 1200 to 921600.
Returns
0 if successful, 1 if an invalid baud rate was provided, >=2 if an error occurred
Note
This function does not validate that the camera is connected or powered on.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CAM_setup()

uint8_t CAM_setup ( )

Set up the camera by powering on and changing the baudrate to 230400.

Returns
0 on success. The error code from the CAM_change_baudrate function, or >100 if an EPS error occurred.
Note
Does not perform a self-test.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CAM_test()

uint8_t CAM_test ( )

Send the 't' test command to the camera, and check if the response is valid.

Returns
0 if successful, >0 if an error occurred.
Note
You should call CAM_setup before calling this function.
Here is the call graph for this function:
Here is the caller graph for this function: