From 69f5c4ec4909d67b41e1b58cd3674b7f143c1e9d Mon Sep 17 00:00:00 2001 From: laranjeiro Date: Tue, 6 Oct 2009 13:46:45 +0000 Subject: *cl: Toogle leds. * Used the TOGGLE gpio for leds. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5954 017c9cb6-072f-447c-8318-d5b54f68fe89 --- cesar/cl/Config | 4 ++++ cesar/cl/src/cl.c | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'cesar/cl') 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 #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); } /** -- cgit v1.2.3