summaryrefslogtreecommitdiff
path: root/camera.h
diff options
context:
space:
mode:
Diffstat (limited to 'camera.h')
-rw-r--r--camera.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/camera.h b/camera.h
index ca8785b..a3291a4 100644
--- a/camera.h
+++ b/camera.h
@@ -47,9 +47,8 @@
#define CAM_BAUD_RATE 38400
#define TTY_TIMEOUT 5000
-static const char TTY_PATH[] = "/dev/ttyHS0";
-
typedef struct {
+ char devPath[256];
int fd; // file descriptor for the serial port
uint8_t serialNum; // camera serial number
uint8_t buff[CAM_BUFF_SIZE]; // uint8_t array to store camera data
@@ -124,8 +123,8 @@ void cam_sendCommand(Camera* cam, uint8_t cmd, uint8_t args[], uint8_t nArgs);
int fd_dataAvail(int fd, int* data);
ssize_t fd_getByte(int fd, uint8_t* data);
LE_SHARED int fd_closeCam(int fd);
-LE_SHARED int fd_openCam();
+LE_SHARED int fd_openCam(char* devPath);
int fd_openSerial(const char* device, int baud);
speed_t fd_convertBaud(int baud);
-#endif \ No newline at end of file
+#endif