2012-08-14 18:07:04 -04:00
|
|
|
/*****************************************************************************
|
|
|
|
* Product: QF/C, TMS320C28x, vanilla port, TI-C2000 compiler
|
2013-02-12 10:04:39 -05:00
|
|
|
* Last Updated for Version: 4.5.03
|
|
|
|
* Date of the Last Update: Jan 18, 2013
|
2012-08-14 18:07:04 -04:00
|
|
|
*
|
|
|
|
* Q u a n t u m L e a P s
|
|
|
|
* ---------------------------
|
|
|
|
* innovating embedded systems
|
|
|
|
*
|
2013-02-12 10:04:39 -05:00
|
|
|
* Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
|
2012-08-14 18:07:04 -04:00
|
|
|
*
|
2013-02-12 10:04:39 -05:00
|
|
|
* This program is open source 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 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2012-08-14 18:07:04 -04:00
|
|
|
*
|
2013-02-12 10:04:39 -05:00
|
|
|
* Alternatively, this program may be distributed and modified under the
|
2012-08-14 18:07:04 -04:00
|
|
|
* terms of Quantum Leaps commercial licenses, which expressly supersede
|
2013-02-12 10:04:39 -05:00
|
|
|
* the GNU General Public License and are specifically designed for
|
|
|
|
* licensees interested in retaining the proprietary status of their code.
|
|
|
|
*
|
|
|
|
* This program 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/>.
|
2012-08-14 18:07:04 -04:00
|
|
|
*
|
|
|
|
* Contact information:
|
2013-02-12 10:04:39 -05:00
|
|
|
* Quantum Leaps Web sites: http://www.quantum-leaps.com
|
|
|
|
* http://www.state-machine.com
|
2012-08-14 18:07:04 -04:00
|
|
|
* e-mail: info@quantum-leaps.com
|
|
|
|
*****************************************************************************/
|
|
|
|
#ifndef qf_port_h
|
|
|
|
#define qf_port_h
|
|
|
|
|
|
|
|
/* The maximum number of active objects in the application, see NOTE01 */
|
|
|
|
#define QF_MAX_ACTIVE 8
|
|
|
|
|
2013-02-12 10:04:39 -05:00
|
|
|
#define QF_MAX_EPOOL 3
|
2012-08-14 18:07:04 -04:00
|
|
|
#define QF_EVENT_SIZ_SIZE 2
|
|
|
|
#define QF_EQUEUE_CTR_SIZE 2
|
|
|
|
#define QF_MPOOL_SIZ_SIZE 2
|
|
|
|
#define QF_MPOOL_CTR_SIZE 2
|
|
|
|
#define QF_TIMEEVT_CTR_SIZE 2
|
|
|
|
|
|
|
|
/* QF interrupt disable/enable */
|
|
|
|
#define QF_INT_DISABLE() __disable_interrupts()
|
|
|
|
#define QF_INT_ENABLE() __enable_interrupts()
|
|
|
|
|
|
|
|
/* QF critical section policy, see NOTE02 */
|
|
|
|
#define QF_CRIT_STAT_TYPE unsigned int
|
|
|
|
#define QF_CRIT_ENTRY(stat_) ((stat_) = __disable_interrupts())
|
|
|
|
#define QF_CRIT_EXIT(stat_) __restore_interrupts(stat_)
|
|
|
|
|
|
|
|
|
|
|
|
#include "qep_port.h" /* QEP port */
|
|
|
|
#include "qvanilla.h" /* "Vanilla" cooperative kernel */
|
|
|
|
#include "qf.h" /* QF platform-independent public interface */
|
|
|
|
|
|
|
|
void QF_zero(void); /* zero the .bss QF variables */
|
|
|
|
void bzero(uint8_t *ptr, uint16_t len); /* helper to clear other objects */
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* NOTE01:
|
|
|
|
* The maximum number of active objects QF_MAX_ACTIVE could be increased to
|
|
|
|
* 63 inclusive. Here, the lower limit is used only to save some RAM.
|
|
|
|
*
|
|
|
|
* NOTE02:
|
|
|
|
* The QF_CRIT_STAT_TYPE macro is defined, which means that this QP port
|
|
|
|
* uses the policy of "saving and restoring critical section status". This
|
|
|
|
* policy allows nesting of critical sections.
|
|
|
|
*
|
|
|
|
* The TMS320C28x automatically disables interrupts upon the entry to an ISR
|
|
|
|
* by setting the INTM mask. This means that the whole body of an ISR is a
|
|
|
|
* critical section. Therefore, in order to call QP services from ISRs, this
|
|
|
|
* port uses policy that allows nesting critical sections.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#endif /* qf_port_h */
|