hw/sensor: Make sure evt pool area is properly aligned
@@ -77,9 +77,12 @@ static struct os_event sensor_read_event = {
.ev_cb = sensor_read_ev_cb,
};
+#define SENSOR_NOTIFY_EVT_MEMPOOL_SIZE \
+ OS_MEMPOOL_SIZE(MYNEWT_VAL(SENSOR_NOTIF_EVENTS_MAX), \
+ sizeof(struct sensor_notify_os_ev))
+
static struct os_mempool sensor_notify_evt_pool;
-static uint8_t sensor_notify_evt_area[OS_MEMPOOL_BYTES(MYNEWT_VAL(SENSOR_NOTIF_EVENTS_MAX),
- sizeof(struct sensor_notify_os_ev))];
+static os_membuf_t sensor_notify_evt_area[SENSOR_NOTIFY_EVT_MEMPOOL_SIZE];
/**
* Lock sensor manager to access the list of sensors
