Inital commit

This commit is contained in:
2021-06-12 12:53:02 +02:00
commit ed43fb747a
6 changed files with 486 additions and 0 deletions

41
uvosled.h Normal file
View File

@ -0,0 +1,41 @@
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CHANNEL_A 1
#define CHANNEL_B (1 << 1)
#define CHANNEL_C (1 << 2)
#define CHANNEL_D (1 << 3)
struct uvosled {
struct usbshm* priv;
};
int uvosled_connect(struct uvosled* led);
// power on cameras
int uvosled_poweron(struct uvosled* led);
// power off cameras
int uvosled_poweroff(struct uvosled* led);
// channels is a mask of bits, you can set it like this: CHANNEL_A | CHANNEL_C to activate channels A and C
// current is in Ampere
int uvosled_set_current(struct uvosled* led, uint8_t channels, float current);
// causes the cameras to take an image
int uvosled_trigger(struct uvosled* led);
// leds are lit for time seconds and the camera is activated cameraOffset seconds after they are lit
// real time guarenteed by microcontroller
int uvosled_capture(struct uvosled* led, int channels, float current, double time, double cameraOffset);
void uvosled_disconnect(struct uvosled* led);
#ifdef __cplusplus
}
#endif