The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Anna Bridge
Date:
Fri Jun 22 15:38:59 2018 +0100
Revision:
169:a7c7b631e539
Parent:
109:9296ab0bfc11
mbed library. Release version 162

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 109:9296ab0bfc11 1 /**
Kojto 109:9296ab0bfc11 2 ******************************************************************************
Kojto 109:9296ab0bfc11 3 * @file W7500x_stdPeriph_Driver/inc/W7500x_dualtimer.h
Kojto 109:9296ab0bfc11 4 * @author IOP Team
Kojto 109:9296ab0bfc11 5 * @version V1.0.0
Kojto 109:9296ab0bfc11 6 * @date 01-May-2015
Kojto 109:9296ab0bfc11 7 * @brief This file contains all the functions prototypes for the dualtimer
Kojto 109:9296ab0bfc11 8 * firmware library.
Kojto 109:9296ab0bfc11 9 ******************************************************************************
Kojto 109:9296ab0bfc11 10 *
Kojto 109:9296ab0bfc11 11 ******************************************************************************
Kojto 109:9296ab0bfc11 12 */
Kojto 109:9296ab0bfc11 13
Kojto 109:9296ab0bfc11 14 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 109:9296ab0bfc11 15 #ifndef __W7500X_DUALTIMER_H
Kojto 109:9296ab0bfc11 16 #define __W7500X_DUALTIMER_H
Kojto 109:9296ab0bfc11 17
Kojto 109:9296ab0bfc11 18 #ifdef __cplusplus
Kojto 109:9296ab0bfc11 19 extern "C" {
Kojto 109:9296ab0bfc11 20 #endif
Kojto 109:9296ab0bfc11 21
Kojto 109:9296ab0bfc11 22 /* Includes ------------------------------------------------------------------*/
Kojto 109:9296ab0bfc11 23 #include "W7500x.h"
Kojto 109:9296ab0bfc11 24
Kojto 109:9296ab0bfc11 25 /**********************************************************************************************/
Kojto 109:9296ab0bfc11 26 /**********************************************************************************************/
Kojto 109:9296ab0bfc11 27 // This structure and define must be in W7500x.h
Kojto 109:9296ab0bfc11 28 /**********************************************************************************************/
Kojto 109:9296ab0bfc11 29 /**********************************************************************************************/
Kojto 109:9296ab0bfc11 30
Kojto 109:9296ab0bfc11 31 typedef struct
Kojto 109:9296ab0bfc11 32 {
Kojto 109:9296ab0bfc11 33 uint32_t TimerLoad;
Kojto 109:9296ab0bfc11 34 uint32_t TimerControl_Mode;
Kojto 109:9296ab0bfc11 35 uint32_t TimerControl_Pre;
Kojto 109:9296ab0bfc11 36 uint32_t TimerControl_Size;
Kojto 109:9296ab0bfc11 37 uint32_t TimerControl_OneShot;
Kojto 109:9296ab0bfc11 38 }DUALTIMER_InitTypDef;
Kojto 109:9296ab0bfc11 39
Kojto 109:9296ab0bfc11 40
Kojto 109:9296ab0bfc11 41 #define IS_DUALTIMER_TimerMode(MODE) (MODE <= 1)
Kojto 109:9296ab0bfc11 42 #define IS_DUALTIMER_TimerPre(PREE) (PRE <= 2)
Kojto 109:9296ab0bfc11 43 #define IS_DUALTIMER_TimerSize(SIZE) (SIZE <= 1)
Kojto 109:9296ab0bfc11 44 #define IS_DUALTIMER_OneShot(ONESHOT) (ONESHOT <= 1)
Kojto 109:9296ab0bfc11 45
Kojto 109:9296ab0bfc11 46
Kojto 109:9296ab0bfc11 47
Kojto 109:9296ab0bfc11 48
Kojto 109:9296ab0bfc11 49
Kojto 109:9296ab0bfc11 50
Kojto 109:9296ab0bfc11 51 #define DUALTIMER_Int_Clear 0x1ul
Kojto 109:9296ab0bfc11 52
Kojto 109:9296ab0bfc11 53 #define DUALTIMER_Clock_Enable 0x1ul
Kojto 109:9296ab0bfc11 54 #define DUALTIMER_Clock_Disable ~DUALTIMER_Clock_Enable
Kojto 109:9296ab0bfc11 55
Kojto 109:9296ab0bfc11 56
Kojto 109:9296ab0bfc11 57 #define IS_DUALTIMER_ALL_CH(CH) ((CH == DUALTIMER0_0) || \
Kojto 109:9296ab0bfc11 58 (CH == DUALTIMER0_1) || \
Kojto 109:9296ab0bfc11 59 (CH == DUALTIMER1_0) || \
Kojto 109:9296ab0bfc11 60 (CH == DUALTIMER1_1))
Kojto 109:9296ab0bfc11 61
Kojto 109:9296ab0bfc11 62
Kojto 109:9296ab0bfc11 63
Kojto 109:9296ab0bfc11 64 void DUALTIMER_ClockEnable(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 65 void DUALTIMER_ClockDisable(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 66 void DUALTIMER_DeInit(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 67 void DUALTIMER_Init(DUALTIMER_TypeDef* DUALTIMERn, DUALTIMER_InitTypDef* DUALTIMER_InitStruct);
Kojto 109:9296ab0bfc11 68 void DUALTIMER_IntConfig(DUALTIMER_TypeDef* DUALTIMERn, FunctionalState state);
Kojto 109:9296ab0bfc11 69 void DUALTIMER_IntClear(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 70 ITStatus DUALTIMER_GetIntStatus(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 71 FlagStatus DUALTIMER_GetIntEnableStatus(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 72 void DUALTIMER_Start(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 73 void DUALTIMER_Stop(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 74 uint32_t DUALTIMER_GetTimerLoad(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 75 void DUALTIMER_SetTimerLoad(DUALTIMER_TypeDef* DUALTIMERn, uint32_t TimerLoad);
Kojto 109:9296ab0bfc11 76 uint32_t DUALTIMER_GetTimerValue(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 77 uint32_t DUALTIMER_GetTimerControl(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 78 void DUALTIMER_SetTimerControl(DUALTIMER_TypeDef* DUALTIMERn, uint32_t TimerControl);
Kojto 109:9296ab0bfc11 79 uint32_t DUALTIMER_GetTimerRIS(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 80 uint32_t DUALTIMER_GetTimerMIS(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 81 uint32_t DUALTIMER_GetTimerBGLoad(DUALTIMER_TypeDef* DUALTIMERn);
Kojto 109:9296ab0bfc11 82 void DUALTIMER_SetTimerBGLoad(DUALTIMER_TypeDef* DUALTIMERn, uint32_t TimerBGLoad);
Kojto 109:9296ab0bfc11 83
Kojto 109:9296ab0bfc11 84
Kojto 109:9296ab0bfc11 85
Kojto 109:9296ab0bfc11 86 //======================= Interrupt handler ==============================
Kojto 109:9296ab0bfc11 87 //void DUALTIMER0_Handler();
Kojto 109:9296ab0bfc11 88 //void DUALTIMER1_Handler();
Kojto 109:9296ab0bfc11 89
Kojto 109:9296ab0bfc11 90
Kojto 109:9296ab0bfc11 91 #ifdef __cplusplus
Kojto 109:9296ab0bfc11 92 }
Kojto 109:9296ab0bfc11 93 #endif
Kojto 109:9296ab0bfc11 94
Kojto 109:9296ab0bfc11 95
Kojto 109:9296ab0bfc11 96 #endif //__W7500X_DUALTIMER_H