Files
IronOS/workspace/ts100/inc/Bios.h
Ben V. Brown 871e8e35c9 Convert original source to system workbench
Create readme
Started commenting the files in english
NO Optimisations yet, just trying to get it all working over as is first
Using newer STM StdPeriph libs (i think they are newer?)
2016-09-11 21:42:42 +10:00

60 lines
1.8 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/********************* (C) COPYRIGHT 2015 e-Design Co.,Ltd. ********************
File Name : Bios.h
Version : S100 APP Ver 2.11
Description:
Author : bure & Celery
Data: 2015/08/03
History:
2015/08/03 ͳһ<CDB3><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*******************************************************************************/
#ifndef __BIOS_H
#define __BIOS_H
#include "stm32f10x.h"
#include "S100V0_1.h"
extern volatile u32 gTime[];
#define USB_DN_OUT() GPIOA->CRH = (GPIOA->CRH & 0xFFFF3FFF) | 0x00003000
#define USB_DP_OUT() GPIOA->CRH = (GPIOA->CRH & 0xFFF3FFFF) | 0x00030000
#define USB_DN_EN() GPIOA->CRH = (GPIOA->CRH & 0xFFFFBFFF) | 0x0000B000
#define USB_DP_EN() GPIOA->CRH = (GPIOA->CRH & 0xFFFBFFFF) | 0x000B0000
#define USB_DP_PD() GPIOA->CRH = (GPIOA->CRH & 0xFFF3FFFF) | 0x00030000
#define USB_DN_HIGH() GPIOA->BSRR = GPIO_Pin_11
#define USB_DP_HIGH() GPIOA->BSRR = GPIO_Pin_12
#define USB_DN_LOW() GPIOA->BRR = GPIO_Pin_11
#define USB_DP_LOW() GPIOA->BRR = GPIO_Pin_12
#define LOW 0
#define HIGH 1
#define BLINK 1 // Bit0 : 0/1 <20><>ʾ/<2F><>˸״̬<D7B4><CCAC>־
#define WAIT_TIMES 100000
#define SECTOR_SIZE 512
#define SECTOR_CNT 4096
#define HEAT_T 200
u32 Get_HeatingTime(void);
void Set_HeatingTime(u32 heating_time);
u16 Get_AdcValue(u8 i);
void Init_Gtime(void);
void Delay_Ms(u32 ms);
void Delay_HalfMs(u32 ms);
void USB_Port(u8 state);
void NVIC_Config(u16 tab_offset);
void RCC_Config(void);
void GPIO_Config(void);
void Ad_Init(void);
void Init_Timer2(void);
void Init_Timer3(void);
void TIM2_ISR(void);
void TIM3_ISR(void);
#endif
/********************************* END OF FILE ********************************/