mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
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:
@@ -1,68 +1,37 @@
|
||||
/********************* (C) COPYRIGHT 2015 e-Design Co.,Ltd. ********************
|
||||
Brief : <20>ײ<EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Author : bure
|
||||
Modified by Ben V. Brown into English
|
||||
*******************************************************************************/
|
||||
/*
|
||||
* Defines for the device
|
||||
* These houses the settings for the device hardware
|
||||
*/
|
||||
#include "stm32f10x.h"
|
||||
|
||||
#define PRODUCT_INFO "TS100"
|
||||
#define MCU_TYPE "STM32F103T8"
|
||||
#define ADC_TYPE "MCU's ADC"
|
||||
#define FPGA_TYPE "None"
|
||||
#define SCH_VER "2.46"
|
||||
// #define SSD1316 1
|
||||
// #define MFTSEEED "Manufacturer"
|
||||
// #define MFTMINI "Manufacturer"
|
||||
|
||||
#define SPIx SPI1
|
||||
#define FLASH_PAGE 0x0400
|
||||
#include "stm32f10x_gpio.h"
|
||||
//--------------------------- key Definitions ------------------------------//
|
||||
#define KEY1_PIN GPIO_Pin_9 //PA8
|
||||
#define KEY2_PIN GPIO_Pin_6 //PA6
|
||||
#define KEY_1 !(GPIOA->IDR & KEY1_PIN)
|
||||
#define KEY_2 !(GPIOA->IDR & KEY2_PIN)
|
||||
#define KEY_DFU KEY_1
|
||||
#define KEY_ON 0
|
||||
|
||||
#define I2C1_DMA_CHANNEL_TX DMA1_Channel6
|
||||
#define I2C1_DMA_CHANNEL_RX DMA1_Channel7
|
||||
#define KEY_A KEY1_PIN
|
||||
#define KEY_B KEY2_PIN
|
||||
#define BUT_A 0x01
|
||||
#define BUT_B 0x02
|
||||
|
||||
#define I2C2_DMA_CHANNEL_TX DMA1_Channel4
|
||||
#define I2C2_DMA_CHANNEL_RX DMA1_Channel5
|
||||
|
||||
#define I2C1_DR_Address 0x40005410
|
||||
#define I2C2_DR_Address 0x40005810
|
||||
|
||||
#define SERIAL_NO1 (*(u32*)0x1FFFF7E8)
|
||||
#define SERIAL_NO2 (*(u32*)0x1FFFF7EC)
|
||||
#define SERIAL_NO3 (*(u32*)0x1FFFF7F0)
|
||||
|
||||
//--------------------------- OLED <20><>ؿ<EFBFBD><D8BF><EFBFBD><EFBFBD>ź<EFBFBD> ------------------------------//
|
||||
//--------------------------- OLED ------------------------------//
|
||||
#define OLED_RST_PIN GPIO_Pin_8 //PA9
|
||||
#define OLED_RST() GPIO_ResetBits(GPIOA, OLED_RST_PIN)
|
||||
#define OLED_ACT() GPIO_SetBits (GPIOA, OLED_RST_PIN)
|
||||
|
||||
//------------------------------ <EFBFBD><EFBFBD><EFBFBD>ȿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD> --------------------------------//
|
||||
#define HEAT_PIN GPIO_Pin_4 //PA15(JTDI)
|
||||
//------------------------------ Iron Heater --------------------------------//
|
||||
#define HEAT_PIN GPIO_Pin_4
|
||||
#define HEAT_OFF() GPIOB->BRR = HEAT_PIN
|
||||
#define HEAT_ON() GPIOB->BSRR = HEAT_PIN
|
||||
|
||||
#define HEAT_OFF() GPIOB->BRR = HEAT_PIN//GPIO_ResetBits(GPIOB, HEAT_PIN)
|
||||
#define HEAT_ON() GPIOB->BSRR = HEAT_PIN//GPIO_SetBits (GPIOB, HEAT_PIN)
|
||||
|
||||
//---------------------<2D><><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD>--VB---------------------------------------//
|
||||
//-----------------------Battery voltage measurement---------------------------------------//
|
||||
#define VB_PIN GPIO_Pin_1 //PB1(Ai9)
|
||||
//----------------------------ADX345 INT1,INT2--------------------------------//
|
||||
|
||||
//----------------------------Accelerometer INT1,INT2--------------------------------//
|
||||
#define INT1_PIN GPIO_Pin_5 //PB5
|
||||
#define INT2_PIN GPIO_Pin_3 //PB3
|
||||
//------------------------------ GPIO <20>˿<EFBFBD><CBBF><EFBFBD><EFBFBD><EFBFBD> -------------------------------//
|
||||
|
||||
#define GPIOA_OUTPUT() GPIOA->ODR = 0xFFFF;
|
||||
#define GPIOA_L_DEF() GPIOA->CRL = 0x08888888; /* Ai7 K2 xxx xxx xxx xxx xxx xxx */
|
||||
#define GPIOA_H_DEF() GPIOA->CRH = 0x8BBBB883; /* xxx SWC SWD D+ D- xxx K1 nCR */
|
||||
|
||||
#define GPIOB_OUTPUT() GPIOB->ODR = 0xFFFF;
|
||||
#define GPIOB_L_DEF() GPIOB->CRL = 0x44838800; /* SDA SCL It1 Po It2 xxx Ai9 Ai8 */
|
||||
#define GPIOB_H_DEF() GPIOB->CRH = 0x88888888; /* xxx xxx xxx xxx xxx xxx xxx xxx */
|
||||
|
||||
//--------------------------------- RCC <20><><EFBFBD><EFBFBD> ---------------------------------//
|
||||
//--------------------------------- RCC Clock Config ---------------------------------//
|
||||
|
||||
#define RCC_PLL_EN() RCC->CR |= 0x01000000;// PLL En
|
||||
|
||||
@@ -77,4 +46,3 @@
|
||||
||+-------Bit22 = 1 USB prescaler is PLL clock
|
||||
++--------Bits31~27 Reserved*/
|
||||
|
||||
/******************************** END OF FILE *********************************/
|
||||
|
||||
Reference in New Issue
Block a user