Temp control working

Fix pid error
Remove pointless static keywords
This commit is contained in:
Ben V. Brown
2016-09-16 22:36:24 +10:00
parent 96bda69a0a
commit f355ff6c01
8 changed files with 31 additions and 134 deletions

View File

@@ -1,29 +0,0 @@
/********************* (C) COPYRIGHT 2015 e-Design Co.,Ltd. ********************
File Name : Flash.h
Version : Author : bure
*******************************************************************************/
#ifndef __EXT_FLASH_H
#define __EXT_FLASH_H
#include "stm32f10x.h"
#define PAGESIZE 256
#define WREN 0x06 // Write enable instruction
#define READ 0x03 // Read from Memory instruction
#define RDSR 0x05 // Read Status Register instruction
#define PP 0x02 // Write to Memory instruction
#define PW 0x0A // Page write instruction
#define OK 0 //
#define SEC_ERR 1 //
#define TMAX 100000 //
#define WIP_Flag 0x01 // Write In Progress (WIP) flag
#define Dummy_Byte 0xA5
u8 FLASH_Prog(u32 Address, u16 Data);
void FLASH_Erase(u32 Address);
void ExtFlashPageWR(u8* pBuffer, u32 WriteAddr);
void ExtFlashDataRD(u8* pBuffer, u32 ReadAddr, u16 Lenght);
#endif
/********************************* END OF FILE ******************************/

View File

@@ -6,15 +6,10 @@
#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
//--------------------------- key Definitions ------------------------------//
#define KEY1_PIN GPIO_Pin_9 //PA8
#define KEY2_PIN GPIO_Pin_6 //PA6
@@ -33,23 +28,23 @@
#define I2C2_DR_Address 0x40005810
//--------------------------- OLED <EFBFBD><EFBFBD>ؿ<EFBFBD><EFBFBD><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
#define HEAT_OFF() GPIOB->BRR = HEAT_PIN
#define HEAT_ON() GPIOB->BSRR = HEAT_PIN
//---------------------<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD>--VB---------------------------------------//
//-----------------------VB---------------------------------------//
#define VB_PIN GPIO_Pin_1 //PB1(Ai9)
//----------------------------ADX345 INT1,INT2--------------------------------//
#define INT1_PIN GPIO_Pin_5 //PB5
#define INT2_PIN GPIO_Pin_3 //PB3
//------------------------------ GPIO <EFBFBD>˿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -------------------------------//
//------------------------------ GPIO -------------------------------//
#define GPIOA_OUTPUT() GPIOA->ODR = 0xFFFF;
#define GPIOA_L_DEF() GPIOA->CRL = 0x08888888; /* Ai7 K2 xxx xxx xxx xxx xxx xxx */
@@ -59,7 +54,7 @@
#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 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---------------------------------//
//--------------------------------- RCC Clock Config ---------------------------------//
#define RCC_PLL_EN() RCC->CR |= 0x01000000;// PLL En