/* ------------------------------------------------------------------------------------------------ */
/* FILE :		AbassiLib.h																			*/
/*																									*/
/* CONTENTS :																						*/
/*				Configuration build options for the libraries										*/
/*																									*/
/*																									*/
/* Copyright (c) 2016-2017, Code-Time Technologies Inc. All rights reserved.						*/
/*																									*/
/* Code-Time Technologies retains all right, title, and interest in and to this work				*/
/*																									*/
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS							*/
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF										*/
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL							*/
/* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR								*/
/* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,							*/
/* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR							*/
/* OTHER DEALINGS IN THE SOFTWARE.																	*/
/*																									*/
/*																									*/
/*	$Revision: 1.1 $																				*/
/*	$Date: 2017/04/29 16:39:39 $																	*/
/*																									*/
/* ------------------------------------------------------------------------------------------------ */

#ifndef __ABASSILIB_H__
#define __ABASSILIB_H__		1

#define OS_DEF_IN_MAKE 		1					/* To inform Abaasi to not use Abassi.h defintions	*/

#define OS_AVR32A_INT_GRP	64					/* For the EVAL/FREE set to maximum					*/
#define OS_AVR32A_INT_LINE	32					/* For the EVAL/FREE set to maximum					*/

/* ------------------------------------------------------------------------------------------------ */

#ifdef TINY_ABASSI
 #define OS_ALLOC_SIZE		0					/* When !=0, RTOS supplied OSalloc, ==0 is malloc()	*/
 #define OS_COOPERATIVE		0					/* When !=0, the  kernel is in cooperative mode		*/
 #define OS_EVENTS			1					/* If event flags are supported						*/
 #define OS_FCFS			0					/* Allow the use of 1st come 1st serve semaphore	*/
 #define OS_LOGGING_TYPE	0					/* Type of logging to use							*/
 #define OS_MAILBOX			0					/* If mailboxes are used							*/
 #define OS_MAX_PEND_RQST	32U
 #define OS_MIN_STACK_USE	1					/* If the kernel minimizes its stack usage			*/
 #define OS_MBXPUT_ISR		0					/* For mailbox report of full/empty in ISRs			*/
 #define OS_MTX_DEADLOCK	0					/* This test validates this							*/
 #define OS_MTX_INVERSION	0					/* To enable protection against priority inversion	*/
 #define OS_NAMES			1					/* != 0 when named Tasks / Semaphores / Mailboxes	*/
 #define OS_PRIO_CHANGE		1					/* If a task priority can be changed at run time	*/
 #define OS_PRIO_MIN		10					/* Max priority, Idle = OS_PRIO_MIN, AdameEve = 0	*/
 #define OS_PRIO_SAME		1					/* Support multiple tasks with the same priority	*/
 #define OS_ROUND_ROBIN		-100000				/* Use round-robin, value specifies period in uS	*/
 #define OS_RUNTIME			1					/* If create Task / Semaphore / Mailbox at run time	*/
 #define OS_SEARCH_ALGO		0					/* If using a fast search							*/
 #define OS_STARVE_PRIO		0					/* Priority threshold for starving protection		*/
 #define OS_STARVE_RUN_MAX	0					/* Maximum Timer Tick for starving protection		*/
 #define OS_STARVE_WAIT_MAX	0					/* Maximum time on hold for starving protection		*/
 #define OS_STATIC_BUF_MBX	0					/* when OS_STATIC_MBOX != 0, # of buffer element	*/
 #define OS_STATIC_MBX		0					/* If !=0 how many mailboxes						*/
 #define OS_STATIC_NAME		0					/* If named mailboxes/semaphore/task, size in char	*/
 #define OS_STATIC_SEM		0					/* If !=0 how many semaphores and mutexes			*/
 #define OS_STATIC_STACK	0
 #define OS_STATIC_TASK		0					/* If !=0 how many tasks (excluding A&E and Idle)	*/
 #define OS_STATIC_TIM_SRV	0					/* If !=0 how many timer services					*/
 #define OS_TASK_SUSPEND	1					/* If a task can suspend another one				*/
 #define OS_TIMEOUT			1					/* !=0 enables blocking timeout						*/
 #define OS_TIMER_CB		1					/* !=0 gives the timer callback period				*/
 #define OS_TIMER_SRV		0					/* !=0 includes the timer services					*/
 #ifndef OS_TIMER_US							/* Conditional to set app specific					*/
  #define OS_TIMER_US		50000				/* When !=0 enable & timer vaalue in uS				*/
 #endif
 #define OS_USE_TASK_ARG	1					/* If tasks have arguments							*/

 #define OS_STACK_CHECK		0
 #define OS_OUT_OF_MEM		0
 #define OS_CCS_REENT		0
 #define OS_KEIL_REENT		0
 #define OS_NEWLIB_REENT	0
 #define OS_IAR_MTHREAD		0

/* ------------------------------------------------------------------------------------------------ */

#else
 #define OS_ALLOC_SIZE		0					/* When !=0, RTOS supplied OSalloc, ==0 is malloc()	*/
 #define OS_COOPERATIVE		0					/* When !=0, the  kernel is in cooperative mode		*/
 #define OS_EVENTS			1					/* If event flags are supported						*/
 #define OS_FCFS			0					/* Allow the use of 1st come 1st serve semaphore	*/
 #define OS_LOGGING_TYPE	0					/* Type of logging to use							*/
 #define OS_MAILBOX			1					/* If mailboxes are used							*/
 #define OS_MAX_PEND_RQST	32U
 #define OS_MIN_STACK_USE	1					/* If the kernel minimizes its stack usage			*/
 #define OS_MBXPUT_ISR		1					/* For mailbox report of full/empty in ISRs			*/
 #define OS_MTX_DEADLOCK	0					/* This test validates this							*/
 #define OS_MTX_INVERSION	1					/* To enable protection against priority inversion	*/
 #define OS_NAMES			1					/* != 0 when named Tasks / Semaphores / Mailboxes	*/
 #define OS_PRIO_CHANGE		1					/* If a task priority can be changed at run time	*/
 #define OS_PRIO_MIN		10					/* Max priority, Idle = OS_PRIO_MIN, AdameEve = 0	*/
 #define OS_PRIO_SAME		1					/* Support multiple tasks with the same priority	*/
 #define OS_ROUND_ROBIN		-100000				/* Use round-robin, value specifies period in uS	*/
 #define OS_RUNTIME			1					/* If create Task / Semaphore / Mailbox at run time	*/
 #define OS_SEARCH_ALGO		0					/* If using a fast search							*/
 #define OS_STARVE_PRIO		-10					/* Priority threshold for starving protection		*/
 #define OS_STARVE_RUN_MAX	-100				/* Maximum Timer Tick for starving protection		*/
 #define OS_STARVE_WAIT_MAX	-100				/* Maximum time on hold for starving protection		*/
 #define OS_STATIC_BUF_MBX	0					/* when OS_STATIC_MBOX != 0, # of buffer element	*/
 #define OS_STATIC_MBX		0					/* If !=0 how many mailboxes						*/
 #define OS_STATIC_NAME		0					/* If named mailboxes/semaphore/task, size in char	*/
 #define OS_STATIC_SEM		0					/* If !=0 how many semaphores and mutexes			*/
 #define OS_STATIC_STACK	0
 #define OS_STATIC_TASK		0					/* If !=0 how many tasks (excluding A&E and Idle)	*/
 #define OS_STATIC_TIM_SRV	0					/* If !=0 how many timer services					*/
 #define OS_TASK_SUSPEND	1					/* If a task can suspend another one				*/
 #define OS_TIMEOUT			1					/* !=0 enables blocking timeout						*/
 #define OS_TIMER_CB		1					/* !=0 gives the timer callback period				*/
 #define OS_TIMER_SRV		0					/* !=0 includes the timer services					*/
 #ifndef OS_TIMER_US							/* Conditional to set app specific					*/
  #define OS_TIMER_US		50000				/* When !=0 enable & timer vaalue in uS				*/
 #endif
 #define OS_USE_TASK_ARG	1					/* If tasks have arguments							*/

 #define OS_STACK_CHECK		1
 #define OS_OUT_OF_MEM		1
 #define OS_CCS_REENT		0
 #define OS_KEIL_REENT		0
 #define OS_NEWLIB_REENT	0
 #define OS_IAR_MTHREAD		0

#endif

/* ------------------------------------------------------------------------------------------------ */

#endif
/* EOF */
