ATY_LIB V2_102_230218
ATY_LIB for general devices or ALGO
 
Loading...
Searching...
No Matches
timer2_timer_12t.c
Go to the documentation of this file.
1// Copyright 2021 IOsetting <iosetting(at)outlook.com>
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#include "fw_hal.h"
16
17INTERRUPT(Timer2_Routine, EXTI_VectTimer2)
18{
19 UART1_TxString("hello\r\n");
20}
21
22void main(void)
23{
25 // UART1 configuration: baud 115200 with Timer1, 1T mode, no interrupt
27 // 12T mode, prescaler:255+1, frequency: 1, interrupt: ON
32
33 while(1);
34}
#define EXTI_Timer2_SetIntState(__STATE__)
Definition: fw_exti.h:134
#define EXTI_Global_SetIntState(__STATE__)
Definition: fw_exti.h:115
#define EXTI_VectTimer2
Definition: fw_exti.h:49
void SYS_SetClock(void)
Definition: fw_sys.c:40
#define TIM_Timer2_SetRunState(__STATE__)
Definition: fw_tim.h:75
void TIM_Timer2_Config(HAL_State_t freq1t, uint8_t prescaler, uint16_t frequency)
Definition: fw_tim.c:93
@ HAL_State_OFF
Definition: fw_types.h:70
@ HAL_State_ON
Definition: fw_types.h:71
void UART1_TxString(uint8_t *str)
Definition: fw_uart.c:85
@ UART1_BaudSource_Timer1
Definition: fw_uart.h:33
void UART1_Config8bitUart(UART1_BaudSource_t baudSource, HAL_State_t _1TMode, uint32_t baudrate)
Definition: fw_uart.c:56
INTERRUPT(Timer2_Routine, EXTI_VectTimer2)
void main(void)