1
0
forked from me/IronOS

Merge Dev into mainline (#1)

* Removing USB
Need to refine the drive to the iron tip

* Update README.md

* * Rewrite all code from scratch
* Only kept settings
* New font
* New PID
* New Menus
* Use Hardware I2C
* Faster System
* Better Heating Time
* No USB
* Full Menu System
This commit is contained in:
Ben V. Brown
2016-09-30 00:27:55 +10:00
committed by GitHub
parent 278d29bf4c
commit 0b26e669af
77 changed files with 3669 additions and 10430 deletions

View File

@@ -1,59 +1,44 @@
/********************* (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>
*******************************************************************************/
/*
* Setup functions for the basic hardware present in the system
*/
#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
#include "S100V0_1.h"/*For pin definitions*/
#include "Analog.h"/*So that we can attach the DMA to the output array*/
#include "stm32f10x_flash.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_dma.h"
#include "stm32f10x_adc.h"
#include "stm32f10x_tim.h"
#include "stm32f10x_exti.h"
#include "stm32f10x_iwdg.h"
#include "misc.h"
extern volatile uint32_t gHeat_cnt;
inline void setIronTimer(uint32_t time) {
gHeat_cnt = time;
}
inline uint32_t getIronTimer() {
return gHeat_cnt;
}
/*Get set the remaining toggles of the heater output*/
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 Adc_Init(void);
void Init_Timer2(void);
void Init_Timer3(void);
void TIM2_ISR(void);
/*Interrupts*/
void TIM3_ISR(void);
void Init_EXTI(void);
/*Watchdog*/
void Start_Watchdog(uint32_t ms);
void Clear_Watchdog(void);
#endif
/********************************* END OF FILE ********************************/