2007-10-30 10:46:57 +00:00
|
|
|
/*
|
|
|
|
ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
|
|
|
|
|
|
|
|
This file is part of ChibiOS/RT.
|
|
|
|
|
|
|
|
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2009-02-06 17:40:24 +00:00
|
|
|
/**
|
|
|
|
* @file ports/ARM7-LPC214x/lpc214x_ssp.h
|
|
|
|
* @brief LPC214x SSP driver macros and structures.
|
|
|
|
* @addtogroup LPC214x_SSP
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2007-10-30 10:46:57 +00:00
|
|
|
#ifndef _LPC214x_SSP_H_
|
|
|
|
#define _LPC214x_SSP_H_
|
|
|
|
|
2009-02-06 17:40:24 +00:00
|
|
|
/**
|
|
|
|
* @brief SSP bus mutual exclusion control.
|
2009-02-06 20:11:32 +00:00
|
|
|
* @details Configuration parameter, if set to @p TRUE enforces mutual
|
2009-02-06 17:40:24 +00:00
|
|
|
* exclusion when invoking @p sspAcquireBus() and @p sspReleaseBus().
|
|
|
|
* @note The internally used synchronization mechanism is a @p Semaphore.
|
2007-10-31 15:52:26 +00:00
|
|
|
*/
|
2009-02-06 17:40:24 +00:00
|
|
|
#if !defined(LPC214x_SSP_USE_MUTEX) || defined(__DOXYGEN__)
|
|
|
|
#define LPC214x_SSP_USE_MUTEX TRUE
|
|
|
|
#endif
|
2007-10-30 10:46:57 +00:00
|
|
|
|
2007-11-12 15:02:23 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2009-02-06 22:07:17 +00:00
|
|
|
void ssp_init(void);
|
|
|
|
void ssp_setup(int cpsr, int cr0, int cr1);
|
2007-11-12 15:02:23 +00:00
|
|
|
void sspAcquireBus(void);
|
|
|
|
void sspReleaseBus(void);
|
2008-03-05 10:59:11 +00:00
|
|
|
void sspRW(uint8_t *in, uint8_t *out, size_t n);
|
2007-11-12 15:02:23 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2007-10-30 16:32:55 +00:00
|
|
|
|
2007-10-30 10:46:57 +00:00
|
|
|
#endif /* _LPC214x_SSP_H_*/
|
2009-02-06 17:40:24 +00:00
|
|
|
|
|
|
|
/** @} */
|