Browse Source

platforms/common/uORB: Separate IOCTLs going through boardctl interface from the original ones

It was a mistake to mix these two together, it is simpler to implement the boardctl interface
for the protected build, if the boardctl ioctls are different

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
master
Jukka Laitinen 3 years ago committed by Beat Küng
parent
commit
6071b87afc
  1. 2
      platforms/common/uORB/uORBManager.cpp
  2. 29
      platforms/common/uORB/uORBManager.hpp

2
platforms/common/uORB/uORBManager.cpp

@ -57,7 +57,7 @@ bool uORB::Manager::initialize()
} }
#if defined(__PX4_NUTTX) && !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__) #if defined(__PX4_NUTTX) && !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
px4_register_boardct_ioctl(_ORBIOCBASE, orb_ioctl); px4_register_boardct_ioctl(_ORBIOCDEVBASE, orb_ioctl);
#endif #endif
return _Instance != nullptr; return _Instance != nullptr;
} }

29
platforms/common/uORB/uORBManager.hpp

@ -65,7 +65,8 @@ class SubscriptionCallback;
* a handle * a handle
*/ */
#define ORBIOCDEVEXISTS _ORBIOC(30) #define _ORBIOCDEV(_n) (_PX4_IOC(_ORBIOCDEVBASE, _n))
#define ORBIOCDEVEXISTS _ORBIOCDEV(30)
typedef struct orbiocdevexists { typedef struct orbiocdevexists {
const ORB_ID orb_id; const ORB_ID orb_id;
const uint8_t instance; const uint8_t instance;
@ -73,7 +74,7 @@ typedef struct orbiocdevexists {
int ret; int ret;
} orbiocdevexists_t; } orbiocdevexists_t;
#define ORBIOCDEVADVERTISE _ORBIOC(31) #define ORBIOCDEVADVERTISE _ORBIOCDEV(31)
typedef struct orbiocadvertise { typedef struct orbiocadvertise {
const struct orb_metadata *meta; const struct orb_metadata *meta;
bool is_advertiser; bool is_advertiser;
@ -81,13 +82,13 @@ typedef struct orbiocadvertise {
int ret; int ret;
} orbiocdevadvertise_t; } orbiocdevadvertise_t;
#define ORBIOCDEVUNADVERTISE _ORBIOC(32) #define ORBIOCDEVUNADVERTISE _ORBIOCDEV(32)
typedef struct orbiocunadvertise { typedef struct orbiocunadvertise {
void *handle; void *handle;
int ret; int ret;
} orbiocdevunadvertise_t; } orbiocdevunadvertise_t;
#define ORBIOCDEVPUBLISH _ORBIOC(33) #define ORBIOCDEVPUBLISH _ORBIOCDEV(33)
typedef struct orbiocpublish { typedef struct orbiocpublish {
const struct orb_metadata *meta; const struct orb_metadata *meta;
orb_advert_t handle; orb_advert_t handle;
@ -95,7 +96,7 @@ typedef struct orbiocpublish {
int ret; int ret;
} orbiocdevpublish_t; } orbiocdevpublish_t;
#define ORBIOCDEVADDSUBSCRIBER _ORBIOC(34) #define ORBIOCDEVADDSUBSCRIBER _ORBIOCDEV(34)
typedef struct { typedef struct {
const ORB_ID orb_id; const ORB_ID orb_id;
const uint8_t instance; const uint8_t instance;
@ -103,15 +104,15 @@ typedef struct {
void *handle; void *handle;
} orbiocdevaddsubscriber_t; } orbiocdevaddsubscriber_t;
#define ORBIOCDEVREMSUBSCRIBER _ORBIOC(35) #define ORBIOCDEVREMSUBSCRIBER _ORBIOCDEV(35)
#define ORBIOCDEVQUEUESIZE _ORBIOC(36) #define ORBIOCDEVQUEUESIZE _ORBIOCDEV(36)
typedef struct { typedef struct {
const void *handle; const void *handle;
uint8_t size; uint8_t size;
} orbiocdevqueuesize_t; } orbiocdevqueuesize_t;
#define ORBIOCDEVDATACOPY _ORBIOC(37) #define ORBIOCDEVDATACOPY _ORBIOCDEV(37)
typedef struct { typedef struct {
void *handle; void *handle;
void *dst; void *dst;
@ -119,33 +120,33 @@ typedef struct {
bool ret; bool ret;
} orbiocdevdatacopy_t; } orbiocdevdatacopy_t;
#define ORBIOCDEVREGCALLBACK _ORBIOC(38) #define ORBIOCDEVREGCALLBACK _ORBIOCDEV(38)
typedef struct { typedef struct {
void *handle; void *handle;
class uORB::SubscriptionCallback *callback_sub; class uORB::SubscriptionCallback *callback_sub;
bool registered; bool registered;
} orbiocdevregcallback_t; } orbiocdevregcallback_t;
#define ORBIOCDEVUNREGCALLBACK _ORBIOC(39) #define ORBIOCDEVUNREGCALLBACK _ORBIOCDEV(39)
typedef struct { typedef struct {
void *handle; void *handle;
class uORB::SubscriptionCallback *callback_sub; class uORB::SubscriptionCallback *callback_sub;
} orbiocdevunregcallback_t; } orbiocdevunregcallback_t;
#define ORBIOCDEVGETINSTANCE _ORBIOC(40) #define ORBIOCDEVGETINSTANCE _ORBIOCDEV(40)
typedef struct { typedef struct {
const void *handle; const void *handle;
uint8_t instance; uint8_t instance;
} orbiocdevgetinstance_t; } orbiocdevgetinstance_t;
#define ORBIOCDEVUPDATESAVAIL _ORBIOC(41) #define ORBIOCDEVUPDATESAVAIL _ORBIOCDEV(41)
typedef struct { typedef struct {
const void *handle; const void *handle;
unsigned last_generation; unsigned last_generation;
unsigned ret; unsigned ret;
} orbiocdevupdatesavail_t; } orbiocdevupdatesavail_t;
#define ORBIOCDEVISADVERTISED _ORBIOC(42) #define ORBIOCDEVISADVERTISED _ORBIOCDEV(42)
typedef struct { typedef struct {
const void *handle; const void *handle;
bool ret; bool ret;
@ -155,7 +156,7 @@ typedef enum {
ORB_DEVMASTER_STATUS = 0, ORB_DEVMASTER_STATUS = 0,
ORB_DEVMASTER_TOP = 1 ORB_DEVMASTER_TOP = 1
} orbiocdevmastercmd_t; } orbiocdevmastercmd_t;
#define ORBIOCDEVMASTERCMD _ORBIOC(45) #define ORBIOCDEVMASTERCMD _ORBIOCDEV(45)
/** /**

Loading…
Cancel
Save