summaryrefslogtreecommitdiff
path: root/software/mpu/src/boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/mpu/src/boot.c')
-rw-r--r--software/mpu/src/boot.c57
1 files changed, 37 insertions, 20 deletions
diff --git a/software/mpu/src/boot.c b/software/mpu/src/boot.c
index 1f18918..d3b4d59 100644
--- a/software/mpu/src/boot.c
+++ b/software/mpu/src/boot.c
@@ -10,46 +10,63 @@
#include "task.h"
#include "queue.h"
-//static void kernel_Process_Task(void *Param);
-//static xTaskHandle *pkernel_TaskHandle;
-//static Task_Param_t kernel_Param;
+#define NUM_QUEUE_ITEMS_KERNEL ((unsigned long) 2)
+#define NUM_QUEUE_ITEMS_CAMERA ((unsigned long) 2)
+#define NUM_QUEUE_ITEMS_LIGHTSENS ((unsigned long) 2)
-Status_t kernel_Init_Kernel(xQueueHandle * pxQueue);
+Status_t kernel_Init_Kernel(QH_t xQueues);
+Status_t camera_Init_Camera(QH_t xQueues);
+Status_t lightsens_Init_LightSens(QH_t xQueues);
-Status_t boot_Init_Kernel(xQueueHandle * pxQueue)
+/*
+ * Globals */
+static QH_t qh;
+
+Status_t boot_Init_Kernel(QH_t xQueues)
{
- return kernel_Init_Kernel( pxQueue );
+ return kernel_Init_Kernel( xQueues );
}
-Status_t boot_Init_Camera(xQueueHandle * pxQueue)
+Status_t boot_Init_Camera(QH_t xQueues)
{
- return STATUS_OK;
+ return camera_Init_Camera( xQueues );
}
-Status_t boot_Init_LightSens(xQueueHandle * pxQueue)
+Status_t boot_Init_LightSens(QH_t xQueues)
{
- return STATUS_OK;
+ return lightsens_Init_LightSens( xQueues );
}
-Status_t boot_CreateQueues( xQueueHandle *pxQueue_Kernel,
- xQueueHandle *pxQueue_Camera,
- xQueueHandle *pxQueue_LightSens)
+Status_t boot_CreateQueues( xQueueHandle *phxQueue_Kernel,
+ xQueueHandle *phxQueue_Camera,
+ xQueueHandle *phxQueue_LightSens)
{
+ *phxQueue_Kernel = xQueueCreate(NUM_QUEUE_ITEMS_KERNEL, sizeof(Message_t));
+ *phxQueue_Camera = xQueueCreate(NUM_QUEUE_ITEMS_CAMERA, sizeof(Message_t));
+ *phxQueue_LightSens = xQueueCreate(NUM_QUEUE_ITEMS_LIGHTSENS, sizeof(Message_t));
+
return STATUS_OK;
+
}
void boot_Main(void)
{
/*
*
* */
+
+ xQueueHandle hxQueue_Kernel;
+ xQueueHandle hxQueue_Camera;
+ xQueueHandle hxQueue_LightSens;
+
Status_t Status;
- xQueueHandle * pxQueue_Kernel = NULL,
- * pxQueue_Camera = NULL,
- * pxQueue_LightSens = NULL;
- Status = boot_CreateQueues(pxQueue_Kernel, pxQueue_Camera, pxQueue_LightSens);
+ Status = boot_CreateQueues(&hxQueue_Kernel, &hxQueue_Camera, &hxQueue_LightSens);
+
+ qh.hxq_Kernel = hxQueue_Kernel;
+ qh.hxq_Camera = hxQueue_Camera;
+ qh.hxq_LightSens = hxQueue_LightSens;
- Status = boot_Init_Kernel(pxQueue_Kernel);
- Status = boot_Init_Camera(pxQueue_Camera);
- Status = boot_Init_LightSens(pxQueue_LightSens);
+ Status = boot_Init_Kernel(qh);
+ Status = boot_Init_Camera(qh);
+ Status = boot_Init_LightSens(qh);
/* Start the tasks. */
vTaskStartScheduler();