2013-01-08 22:40:58 +08:00
|
|
|
/***************************************************************************//**
|
2021-03-27 15:16:57 +08:00
|
|
|
* @file drv_emu.h
|
|
|
|
* @brief EMU driver of RT-Thread RTOS for EFM32
|
2013-01-08 22:40:58 +08:00
|
|
|
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
2021-03-27 15:16:57 +08:00
|
|
|
* @author onelife
|
2013-01-08 22:40:58 +08:00
|
|
|
* @version 1.0
|
|
|
|
*******************************************************************************
|
|
|
|
* @section License
|
|
|
|
* The license and distribution terms for this file may be found in the file
|
|
|
|
* LICENSE in this distribution or at http://www.rt-thread.org/license/LICENSE
|
|
|
|
*******************************************************************************
|
|
|
|
* @section Change Logs
|
2021-03-27 15:16:57 +08:00
|
|
|
* Date Author Notes
|
|
|
|
* 2011-02-21 onelife Initial creation for EFM32
|
|
|
|
* 2011-07-14 onelife Add multiple channels support for scan mode
|
2013-01-08 22:40:58 +08:00
|
|
|
******************************************************************************/
|
|
|
|
#ifndef __DRV_EMU_H__
|
|
|
|
#define __DRV_EMU_H__
|
|
|
|
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
|
|
/* Exported defines ----------------------------------------------------------*/
|
|
|
|
#define EMU_TASK_STACK_SIZE (256)
|
|
|
|
#define EMU_TASK_EM2_TOKEN_NUMBER (255)
|
|
|
|
#define EMU_TASK_EM3_TOKEN_NUMBER (255)
|
|
|
|
#define EMU_TASK_EM4_TOKEN_NUMBER (255)
|
|
|
|
#define EMU_RX_MESSAGE_SIZE (4)
|
|
|
|
#define EMU_RX_MESSAGE_QUEUE_SIZE (1)
|
|
|
|
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
|
|
struct efm32_emu_task
|
|
|
|
{
|
|
|
|
struct rt_thread thread;
|
|
|
|
struct rt_semaphore em2;
|
|
|
|
struct rt_semaphore em3;
|
|
|
|
struct rt_semaphore em4;
|
|
|
|
rt_uint8_t stack[EMU_TASK_STACK_SIZE];
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Exported constants --------------------------------------------------------*/
|
|
|
|
/* Exported macro ------------------------------------------------------------*/
|
|
|
|
/* Exported functions ------------------------------------------------------- */
|
|
|
|
void emu_all_disable(void);
|
|
|
|
void emu_em2_disable(void);
|
|
|
|
void emu_em2_enable(void);
|
|
|
|
void emu_em3_disable(void);
|
|
|
|
void emu_em3_enable(void);
|
|
|
|
void emu_em4_disable(void);
|
|
|
|
void emu_em4_enable(void);
|
|
|
|
void efm32_emu_init(void);
|
|
|
|
|
|
|
|
#endif /*__DRV_EMU_H__ */
|