summaryrefslogtreecommitdiff
path: root/cesar/cl
diff options
context:
space:
mode:
authorlaranjeiro2009-10-06 13:46:45 +0000
committerlaranjeiro2009-10-06 13:46:45 +0000
commit69f5c4ec4909d67b41e1b58cd3674b7f143c1e9d (patch)
tree6de70081c1d984d3aeac86105661c3fbed609db8 /cesar/cl
parentfce9826249416ebd9c501def1b0f4e4710fbb0cb (diff)
*cl: Toogle leds.
* Used the TOGGLE gpio for leds. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5954 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cl')
-rw-r--r--cesar/cl/Config4
-rw-r--r--cesar/cl/src/cl.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/cesar/cl/Config b/cesar/cl/Config
index eec068d976..c783da3558 100644
--- a/cesar/cl/Config
+++ b/cesar/cl/Config
@@ -1 +1,5 @@
CONFIG_CL_EOC_CLASSIFY = n
+CONFIG_GPIO_LED_CL_RX = n
+CONFIG_GPIO_LED_CL_RX_GPIO = 0
+CONFIG_GPIO_LED_CL_TX = n
+CONFIG_GPIO_LED_CL_TX_GPIO = 0
diff --git a/cesar/cl/src/cl.c b/cesar/cl/src/cl.c
index 79be926f9f..1c37d87af0 100644
--- a/cesar/cl/src/cl.c
+++ b/cesar/cl/src/cl.c
@@ -36,6 +36,7 @@
#include <stdio.h>
#include "hal/arch/arch.h"
+#include "hal/gpio/gpio.h"
static struct cl_t cl_global;
@@ -191,6 +192,12 @@ cl_send_init (cl_t *cl, u8 *buffer, bool mme)
cl_data->buffer = buffer;
cl_data->mme = mme;
+ /* Debug leds. */
+ GPIO_SETUP (LED_CL_RX, GPIO_DIRECTION_OUT);
+ GPIO_SET (LED_CL_RX, 0);
+ GPIO_SETUP (LED_CL_TX, GPIO_DIRECTION_OUT);
+ GPIO_SET (LED_CL_TX, 0);
+
return cl_data;
}
@@ -736,6 +743,9 @@ void cl_mme_sar_send_done (cl_t *ctx, u8 *buffer, void *cl_data)
data = cl_data;
slab_release (data);
+
+ /* Debug info. */
+ GPIO_TOGGLE (LED_CL_TX);
}
void cl_mme_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs, bool
@@ -753,6 +763,9 @@ void cl_mme_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs, bool
buffer, length, mfs ? true : false, encryption);
CL_TRACE (MME_RECV, mac_ntb(), length, buffer, mfs ? true : false);
+
+ /* Debug info. */
+ GPIO_TOGGLE (LED_CL_RX);
}
void cl_mme_recv_done (cl_t *ctx, u8* buffer, bool mme_recv)
@@ -814,6 +827,9 @@ void cl_data_send_done (cl_t *ctx, u8 *buffer, void *cl_data)
data = cl_data;
slab_release (data);
+
+ /* Debug info. */
+ GPIO_TOGGLE (LED_CL_TX);
}
/**
@@ -876,6 +892,9 @@ void cl_data_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs)
blk_release (sta);
}
}
+
+ /* Debug info. */
+ GPIO_TOGGLE (LED_CL_RX);
}
/**