From 9da7f0b661c0f776a14d9f69295f23ed486de584 Mon Sep 17 00:00:00 2001 From: liamstask Date: Sat, 24 Apr 2010 21:16:10 +0000 Subject: * add serial support for the AT91SAM7 DBGU peripheral git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1888 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/AT91SAM7/serial_lld.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'os/hal/platforms/AT91SAM7/serial_lld.h') diff --git a/os/hal/platforms/AT91SAM7/serial_lld.h b/os/hal/platforms/AT91SAM7/serial_lld.h index bb4ed0dde..3dd0ca09c 100644 --- a/os/hal/platforms/AT91SAM7/serial_lld.h +++ b/os/hal/platforms/AT91SAM7/serial_lld.h @@ -56,6 +56,15 @@ #define USE_SAM7_USART1 TRUE #endif +/** + * @brief DBGU UART driver enable switch. + * @details If set to @p TRUE the support for the DBGU UART is included. + * @note The default is @p TRUE. + */ +#if !defined(USE_SAM7_DBGU_UART) || defined(__DOXYGEN__) +#define USE_SAM7_DBGU_UART TRUE +#endif + /** * @brief UART1 interrupt priority level setting. */ @@ -70,6 +79,13 @@ #define SAM7_USART1_PRIORITY (AT91C_AIC_PRIOR_HIGHEST - 2) #endif +/** + * @brief DBGU_UART interrupt priority level setting. + */ +#if !defined(SAM7_DBGU_UART_PRIORITY) || defined(__DOXYGEN__) +#define SAM7_DBGU_UART_PRIORITY (AT91C_AIC_PRIOR_HIGHEST - 2) +#endif + /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ @@ -138,6 +154,9 @@ extern SerialDriver SD1; #if USE_SAM7_USART1 && !defined(__DOXYGEN__) extern SerialDriver SD2; #endif +#if USE_SAM7_DBGU_UART +extern SerialDriver SD3; +#endif #ifdef __cplusplus extern "C" { @@ -145,6 +164,9 @@ extern "C" { void sd_lld_init(void); void sd_lld_start(SerialDriver *sdp, const SerialConfig *config); void sd_lld_stop(SerialDriver *sdp); +#if USE_SAM7_DBGU_UART + void sd_lld_serve_interrupt(SerialDriver *sdp); +#endif #ifdef __cplusplus } #endif -- cgit v1.2.3