summaryrefslogtreecommitdiff
path: root/software/mpu/src/camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/mpu/src/camera.c')
-rw-r--r--software/mpu/src/camera.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/software/mpu/src/camera.c b/software/mpu/src/camera.c
index 4fad440..8ec62d3 100644
--- a/software/mpu/src/camera.c
+++ b/software/mpu/src/camera.c
@@ -16,28 +16,34 @@
static Task_Param_t TaskParam_Camera;
/*
- * Wake up other tasks, send them messages telling what to do,
- * wait for them to have processed the commands or not, maybe
- * put them to sleep again, ...
+ * The camera is connected to the MPU vie I2C to control the camera,
+ * and has a 8 bit bus for data transmission ...
* */
static void camera_Process_Task(void *Param)
{
Message_t Msg;
+ portCHAR chMsgBufCam[10] = "Hello Kl!";
if(NULL == TaskParam_Camera.QueueHandles.hxq_Camera)
{
return;
}
+
while(1)
{
- if( xQueueReceive( TaskParam_Camera.QueueHandles.hxq_Camera,
- &Msg, portTICK_RATE_MS * 5 ))
+ if( xQueueReceive( TaskParam_Camera.QueueHandles.hxq_Camera, &Msg, MS(5) ))
{
- /*
- * switch Msg.Sender
- *
- */
- ;
+ switch (Msg.Sender)
+ {
+ case Sender_Kernel:
+ {
+ Msg.Sender = Sender_Camera;
+ Msg.pData = chMsgBufCam;
+ xQueueSend(TaskParam_Camera.QueueHandles.hxq_Kernel, &Msg, MS(10));
+ }
+ default: {;} /* for the time being we ignore messages received from
+ someone other than the kernel. */
+ }
}
}
}