diff --git a/ne16/hal/ne16.c b/ne16/hal/ne16.c index 97859b4..d92a7d5 100644 --- a/ne16/hal/ne16.c +++ b/ne16/hal/ne16.c @@ -23,8 +23,6 @@ #define NE16_STATUS_EMPTY (0x000) #define NE16_STATUS_FULL (0x101) -inline int ne16_task_queue_size(ne16_dev_t *dev) { return 2; } - inline int ne16_task_queue_tasks_in_flight(ne16_dev_t *dev) { uint32_t status = hwpe_task_queue_status(&dev->hwpe_dev); return (status & 0x1) + ((status >> 8) & 0x1); diff --git a/ne16/hal/ne16.h b/ne16/hal/ne16.h index c4c3a19..88ebee7 100644 --- a/ne16/hal/ne16.h +++ b/ne16/hal/ne16.h @@ -24,11 +24,12 @@ #include "hwpe.h" #include +#define NE16_TASK_QUEUE_SIZE (2) + typedef struct ne16_dev_t { hwpe_dev_t hwpe_dev; /* Implements the HWPE device interface */ } ne16_dev_t; -int ne16_task_queue_size(ne16_dev_t *dev); int ne16_task_queue_tasks_in_flight(ne16_dev_t *dev); int ne16_task_queue_empty(ne16_dev_t *dev); int ne16_task_queue_full(ne16_dev_t *dev); diff --git a/neureka/hal/neureka.c b/neureka/hal/neureka.c index ebcad93..dc829d9 100644 --- a/neureka/hal/neureka.c +++ b/neureka/hal/neureka.c @@ -23,8 +23,6 @@ #define NEUREKA_STATUS_EMPTY (0x000) #define NEUREKA_STATUS_FULL (0x101) -inline int neureka_task_queue_size(neureka_dev_t *dev) { return 2; } - inline int neureka_task_queue_tasks_in_flight(neureka_dev_t *dev) { uint32_t status = hwpe_task_queue_status(&dev->hwpe_dev); return (status & 0x1) + ((status >> 8) & 0x1); diff --git a/neureka/hal/neureka.h b/neureka/hal/neureka.h index 887d995..eae77a1 100644 --- a/neureka/hal/neureka.h +++ b/neureka/hal/neureka.h @@ -24,11 +24,12 @@ #include "hwpe.h" #include +#define NEUREKA_TASK_QUEUE_SIZE (2) + typedef struct neureka_dev_t { hwpe_dev_t hwpe_dev; /* Implements the HWPE device interface */ } neureka_dev_t; -int neureka_task_queue_size(neureka_dev_t *dev); int neureka_task_queue_tasks_in_flight(neureka_dev_t *dev); int neureka_task_queue_empty(neureka_dev_t *dev); int neureka_task_queue_full(neureka_dev_t *dev);