Specify languages and allow C++ usage
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
parent
c96c9f0f8c
commit
8ea326e429
6 changed files with 34 additions and 4 deletions
|
@ -23,8 +23,19 @@
|
|||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <cstdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __attribute__((__packed__)) device3_packet_t {
|
||||
uint8_t signature [2];
|
||||
|
@ -133,3 +144,7 @@ device3_quat_type device3_get_orientation(const device3_ahrs_type* ahrs);
|
|||
device3_vec3_type device3_get_euler(device3_quat_type quat);
|
||||
|
||||
void device3_close(device3_type* device);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
|
@ -23,8 +23,15 @@
|
|||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <cstdint.h>
|
||||
#endif
|
||||
|
||||
#define DEVICE4_ACTION_PASSIVE_POLL_START 0b00010
|
||||
#define DEVICE4_ACTION_BRIGHTNESS_COMMAND 0b00011
|
||||
|
@ -36,6 +43,10 @@
|
|||
#define DEVICE4_BUTTON_BRIGHTNESS_UP 0x2
|
||||
#define DEVICE4_BUTTON_BRIGHTNESS_DOWN 0x3
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __attribute__((__packed__)) device4_packet_t {
|
||||
uint8_t signature;
|
||||
uint32_t checksum;
|
||||
|
@ -100,3 +111,7 @@ device4_type* device4_open(device4_event_callback callback);
|
|||
int device4_read(device4_type* device, int timeout);
|
||||
|
||||
void device4_close(device4_type* device);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
Reference in a new issue