]> mj.ucw.cz Git - home-hw.git/commitdiff
Hračka pro Meggy, v1
authorMartin Mares <mj@ucw.cz>
Wed, 8 Aug 2018 17:48:03 +0000 (19:48 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 8 Aug 2018 17:48:03 +0000 (19:48 +0200)
nucleo-test/.mxproject
nucleo-test/Inc/main.h
nucleo-test/Makefile
nucleo-test/Src/main.c
nucleo-test/Src/test.c
nucleo-test/mx.scratch
nucleo-test/nucleo-test.ioc

index 71c1674367c40a43b721eaab4458336d4f4d0fcf..553e2d96a03516034d949956645276c13db47797 100644 (file)
@@ -8,7 +8,7 @@ SourceFiles=stm32f0xx_it.c;main.c;stm32f0xx_hal_msp.c;
 LibFiles=Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_gpio.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_exti.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_system.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_dma.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_bus.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_cortex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rcc.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_utils.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_pwr.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_i2c.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_tim.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_usart.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_crs.h;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_tim.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030x8.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cmSimd.h;\r
 \r
 [PreviousUsedMakefileFiles]\r
-SourceFiles=Src/main.c;Src/stm32f0xx_it.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_tim.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c;/Src/system_stm32f0xx.c;/aux/misc/stm/F0-package/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;/aux/misc/stm/home/nucleo-test///startup_stm32f030x8.s;\r
+SourceFiles=Src/main.c;Src/stm32f0xx_it.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_tim.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c;/Src/system_stm32f0xx.c;/aux/misc/stm/F0-package/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;null;\r
 HeaderPath=/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Inc;/aux/misc/stm/F0-package/Drivers/CMSIS/Device/ST/STM32F0xx/Include;/aux/misc/stm/F0-package/Drivers/CMSIS/Include;Inc;\r
 CDefines=USE_FULL_LL_DRIVER;\r
 \r
index fa3bf1859a4774390f495006a80abc3de997dcfb..704f7eccc46476448bb45c6f50318756b36a0a0e 100644 (file)
 #define LD2_GPIO_Port GPIOA
 #define THERMO_Pin LL_GPIO_PIN_7
 #define THERMO_GPIO_Port GPIOA
+#define MEGGY1_Pin LL_GPIO_PIN_12
+#define MEGGY1_GPIO_Port GPIOB
+#define MEGGY2_Pin LL_GPIO_PIN_13
+#define MEGGY2_GPIO_Port GPIOB
+#define MEGGY3_Pin LL_GPIO_PIN_14
+#define MEGGY3_GPIO_Port GPIOB
+#define MEGGY4_Pin LL_GPIO_PIN_15
+#define MEGGY4_GPIO_Port GPIOB
 #define BMP_DONE_Pin LL_GPIO_PIN_9
 #define BMP_DONE_GPIO_Port GPIOC
 #define TMS_Pin LL_GPIO_PIN_13
index be489888eaecd1688bb3f3c6f0b22f64a2de0b8b..41684d5dae2f82b3648f19e7801b1a696434c49e 100644 (file)
@@ -1,5 +1,5 @@
 ##########################################################################################################################
-# File automatically-generated by tool: [projectgenerator] version: [2.27.0] date: [Thu Jul 05 23:11:33 CEST 2018] 
+# File automatically-generated by tool: [projectgenerator] version: [2.27.0] date: [Wed Aug 08 19:30:18 CEST 2018] 
 ##########################################################################################################################
 
 # ------------------------------------------------
@@ -54,7 +54,6 @@ BUILD_DIR = build
 C_SOURCES =  \
 Src/main.c \
 Src/test.c \
-Src/system_stm32f0xx.c \
 Src/stm32f0xx_it.c \
 /aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c \
 /aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c \
@@ -64,7 +63,8 @@ Src/stm32f0xx_it.c \
 /aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c \
 /aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c \
 /aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_tim.c \
-/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c
+/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c \
+/Src/system_stm32f0xx.c
 
 # ASM sources
 ASM_SOURCES =  \
index fdc17e9056d538144f80a740a36c0ed72d5d1f49..8cd5c6d3802816529d2a049a1aa7a1dfe40d2f19 100644 (file)
@@ -407,6 +407,18 @@ static void MX_GPIO_Init(void)
   /**/
   LL_GPIO_ResetOutputPin(LD2_GPIO_Port, LD2_Pin);
 
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY1_GPIO_Port, MEGGY1_Pin);
+
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY2_GPIO_Port, MEGGY2_Pin);
+
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY3_GPIO_Port, MEGGY3_Pin);
+
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY4_GPIO_Port, MEGGY4_Pin);
+
   /**/
   LL_SYSCFG_SetEXTISource(LL_SYSCFG_EXTI_PORTC, LL_SYSCFG_EXTI_LINE13);
 
@@ -431,6 +443,38 @@ static void MX_GPIO_Init(void)
   GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
   LL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);
 
+  /**/
+  GPIO_InitStruct.Pin = MEGGY1_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY1_GPIO_Port, &GPIO_InitStruct);
+
+  /**/
+  GPIO_InitStruct.Pin = MEGGY2_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY2_GPIO_Port, &GPIO_InitStruct);
+
+  /**/
+  GPIO_InitStruct.Pin = MEGGY3_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY3_GPIO_Port, &GPIO_InitStruct);
+
+  /**/
+  GPIO_InitStruct.Pin = MEGGY4_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY4_GPIO_Port, &GPIO_InitStruct);
+
   /**/
   GPIO_InitStruct.Pin = BMP_DONE_Pin;
   GPIO_InitStruct.Mode = LL_GPIO_MODE_INPUT;
index ed2bae4b6e29c8fcf73a7beb2efac5b74c489d80..0ea1e8f58b3af0b52dd67b77c87b5dff8485d7cf 100644 (file)
@@ -135,458 +135,26 @@ void debug_printf(const char *fmt, ...)
   va_end(args);
 }
 
-#if 0
-
-static uint bmp_read(uint reg, uint bytes)
-{
-  LL_I2C_ClearFlag_STOP(I2C1);
-  LL_I2C_ClearFlag_BERR(I2C1);
-  LL_I2C_HandleTransfer(I2C1, 0xee, LL_I2C_ADDRSLAVE_7BIT, 1, LL_I2C_MODE_SOFTEND, LL_I2C_GENERATE_START_WRITE);
-  while (!LL_I2C_IsActiveFlag_TXE(I2C1))
-    ;
-  LL_I2C_TransmitData8(I2C1, reg);
-  while (!LL_I2C_IsActiveFlag_TC(I2C1))
-    ;
-  LL_I2C_HandleTransfer(I2C1, 0xef, LL_I2C_ADDRSLAVE_7BIT, bytes, LL_I2C_MODE_AUTOEND, LL_I2C_GENERATE_RESTART_7BIT_READ);
-
-  uint d = 0;
-  for (uint i=0; i<bytes; i++)
-    {
-      while (!LL_I2C_IsActiveFlag_RXNE(I2C1))
-       ;
-      d = (d << 8) | LL_I2C_ReceiveData8(I2C1);
-    }
-
-  return d;
-}
-
-static uint bmp_measure(uint type, uint bytes)
-{
-  LL_I2C_HandleTransfer(I2C1, 0xee, LL_I2C_ADDRSLAVE_7BIT, 2, LL_I2C_MODE_AUTOEND, LL_I2C_GENERATE_START_WRITE);
-  while (!LL_I2C_IsActiveFlag_TXE(I2C1))
-    ;
-  LL_I2C_TransmitData8(I2C1, 0xf4);
-  while (!LL_I2C_IsActiveFlag_TXE(I2C1))
-    ;
-  LL_I2C_TransmitData8(I2C1, type);
-  while (!LL_I2C_IsActiveFlag_STOP(I2C1))
-    ;
-
-  while (!LL_GPIO_IsInputPinSet(BMP_DONE_GPIO_Port, BMP_DONE_Pin))
-    ;
-
-  return bmp_read(0xf6, bytes);
-}
-
-// Formulae from BMP085 specs
-void bmp_recalc(uint UT, uint UP, uint oss, u16 cc[11], int *tt, int *pp)
-{
-  s16 AC1 = cc[0];
-  s16 AC2 = cc[1];
-  s16 AC3 = cc[2];
-  u16 AC4 = cc[3];
-  u16 AC5 = cc[4];
-  u16 AC6 = cc[5];
-  s16 B1 = cc[6];
-  s16 B2 = cc[7];
-  s16 MB = cc[8];
-  s16 MC = cc[9];
-  s16 MD = cc[10];
-  UP >>= (8-oss);
-
-  int X1 = (UT-AC6)*AC5 / (1<<15);
-  int X2 = MC*(1<<11) / (X1+MD);
-  int B5 = X1 + X2;
-  int T = (B5+8) / (1<<4);
-  *tt = T;
-
-  int B6 = B5 - 4000;
-  X1 = (B2*(B6*B6/(1<<12))) / (1<<11);
-  X2 = AC2 * B6 / (1<<11);
-  int X3 = X1 + X2;
-  int B3 = (((AC1*4 + X3) << oss) + 2) / 4;
-  X1 = AC3 * B6 / (1<<13);
-  X2 = (B1*(B6*B6/(1<<12))) / (1<<16);
-  X3 = ((X1+X2) + 2) / (1<<2);
-  uint B4 = (uint)(AC4 * (X3 + 32768)) / (1U<<15);
-  uint B7 = (uint)(UP-B3) * (uint)(50000>>oss);
-  int p;
-  if (B7 < 0x80000000)
-    p = (B7*2) / B4;
-  else
-    p = B7 / B4 * 2;
-  X1 = (p/(1<<8)) * (p/(1<<8));
-  X1 = (X1*3038) / (1<<16);
-  X2 = (-7357*p) / (1<<16);
-  p = p + (X1 + X2 + 3791) / (1<<4);
-  *pp = p;
-}
-
-void run_test(void)
-{
-  for (;;)
-    {
-      LL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
-
-      debug_puts("Constants:");
-      u16 cc[11];
-      for (uint i=0; i<11; i++)
-       {
-         cc[i] = bmp_read(0xaa + 2*i, 2);
-         debug_printf(" %04x", cc[i]);
-       }
-      debug_puts("\r\n");
-
-      uint raw_temp = bmp_measure(0x2e, 2);
-      debug_printf("Raw temperature: %04x\r\n", raw_temp);
-
-      uint oss = 3;    // Over-sampling setting
-      uint raw_press = bmp_measure(0xf4 | (oss<<6), 3);
-      debug_printf("Raw pressure: %06x\r\n", raw_press);
-
-      int temp, press;
-      bmp_recalc(raw_temp, raw_press, oss, cc, &temp, &press);
-      debug_printf("Temperature: %d ddegC\r\n", temp);
-      debug_printf("Pressure: %d Pa\r\n", press);
-
-      LL_mDelay(1000);
-    }
-}
-
-#elif 0
-
-static const byte Gentium23x32[] = {
-        0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0x03, 0xF0, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFE, 0x01, 0xE0, 0x3F, 0x3E, 0x00, 0x00, 0x7F, 0x1F, 0x00, 0x00, 0x7C, 0x0F, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x78, 0x1F, 0x00, 0x00, 0x78, 0x3F, 0x00, 0x00, 0x78, 0x7F, 0x00, 0x00, 0x3E, 0xFE, 0x07, 0xC0, 0x3F, 0xFE, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x03, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xFC, 0x0F, 0x00,  // Code for char 0
-        0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x70, 0x78, 0x00, 0x00, 0x70, 0x78, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0x78, 0x7C, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x00, 0x78, 0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,  // Code for char 1
-        0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x01, 0x00, 0x78, 0xE0, 0x03, 0x00, 0x7C, 0xF0, 0x03, 0x00, 0x7E, 0xF8, 0x03, 0x80, 0x7F, 0xFC, 0x01, 0xC0, 0x7F, 0xFE, 0x01, 0xE0, 0x7F, 0x3E, 0x00, 0xF0, 0x7F, 0x1E, 0x00, 0xFC, 0x7F, 0x0F, 0x00, 0xFE, 0x79, 0x0F, 0x00, 0xFF, 0x78, 0x0F, 0xC0, 0x7F, 0x78, 0x1F, 0xE0, 0x3F, 0x78, 0x3F, 0xF8, 0x0F, 0x78, 0xFF, 0xFF, 0x07, 0x78, 0xFE, 0xFF, 0x03, 0x78, 0xFE, 0xFF, 0x00, 0x7C, 0xFC, 0x7F, 0x80, 0x7F, 0xF8, 0x1F, 0x80, 0x7F, 0xE0, 0x07, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 2
-        0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC0, 0x00, 0x00, 0x1F, 0xF0, 0x01, 0x00, 0x1E, 0xF8, 0x01, 0x00, 0x3E, 0xFC, 0x01, 0x00, 0x3C, 0xFE, 0x00, 0x00, 0x7C, 0xFE, 0x00, 0x00, 0x78, 0x1E, 0xE0, 0x00, 0x78, 0x0F, 0xF0, 0x00, 0x78, 0x0F, 0xF0, 0x00, 0x78, 0x0F, 0xF0, 0x00, 0x78, 0x1F, 0xF8, 0x01, 0x7C, 0x3F, 0xFC, 0x01, 0x7C, 0xFF, 0xFF, 0x07, 0x3F, 0xFE, 0xFF, 0xFF, 0x3F, 0xFE, 0xFF, 0xFF, 0x1F, 0xFC, 0xCF, 0xFF, 0x0F, 0xF8, 0xC7, 0xFF, 0x07, 0xE0, 0x83, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 3
-        0x17, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0xFE, 0x3D, 0x00, 0x00, 0xFF, 0x3C, 0x70, 0xC0, 0x3F, 0x3C, 0x70, 0xE0, 0x1F, 0x3C, 0x70, 0xF8, 0x07, 0x3C, 0x78, 0xFC, 0x03, 0x3C, 0x78, 0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x3C, 0x78, 0x00, 0x00, 0x3C, 0x70, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x08, 0x00,  // Code for char 4
-        0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0xC0, 0x00, 0x1F, 0x00, 0xFE, 0x01, 0x1E, 0xFC, 0xFF, 0x01, 0x3E, 0xFC, 0xFF, 0x00, 0x3C, 0xFC, 0xFF, 0x00, 0x3C, 0xFC, 0x7F, 0x00, 0x78, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0xF8, 0x00, 0x7C, 0x3C, 0xF8, 0x00, 0x7E, 0x3C, 0xF0, 0x03, 0x3F, 0x3C, 0xF0, 0xFF, 0x3F, 0x3C, 0xF0, 0xFF, 0x1F, 0x1E, 0xE0, 0xFF, 0x0F, 0x0F, 0xC0, 0xFF, 0x07, 0x06, 0x80, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 5
-        0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xF8, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x07, 0x80, 0xFF, 0xFF, 0x0F, 0xC0, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0x3F, 0xF0, 0xFF, 0xC1, 0x3F, 0xF8, 0xF7, 0x00, 0x7E, 0xF8, 0x71, 0x00, 0x7C, 0xFC, 0x78, 0x00, 0x78, 0x7C, 0x78, 0x00, 0x78, 0x3E, 0x78, 0x00, 0x78, 0x1E, 0xF8, 0x00, 0x7C, 0x1E, 0xF8, 0x03, 0x3E, 0x0F, 0xF0, 0xFF, 0x3F, 0x0F, 0xF0, 0xFF, 0x1F, 0x0F, 0xE0, 0xFF, 0x0F, 0x06, 0xE0, 0xFF, 0x07, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x00, 0x7E, 0x00,  // Code for char 6
-        0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x20, 0x7C, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x00, 0x7E, 0x3C, 0x00, 0x80, 0x7F, 0x3C, 0x00, 0xE0, 0x3F, 0x3C, 0x00, 0xF8, 0x3F, 0x3C, 0x00, 0xFE, 0x1F, 0x3C, 0x80, 0xFF, 0x0F, 0x3C, 0xE0, 0xFF, 0x01, 0x3C, 0xF8, 0x7F, 0x00, 0x3C, 0xFE, 0x0F, 0x00, 0xFC, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,  // Code for char 7
-        0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0xC0, 0x07, 0xFC, 0x07, 0xF0, 0x1F, 0xFE, 0x1F, 0xF8, 0x3F, 0xFF, 0x1F, 0xFC, 0xBF, 0xFF, 0x3F, 0xFE, 0xFF, 0xFF, 0x3F, 0xFE, 0xFF, 0x0F, 0x7E, 0x1F, 0xFE, 0x03, 0x7C, 0x0F, 0xFC, 0x01, 0x78, 0x0F, 0xF8, 0x01, 0x78, 0x0F, 0xF8, 0x01, 0x78, 0x0F, 0xF8, 0x03, 0x78, 0x1F, 0xFC, 0x07, 0x7C, 0xFF, 0xFF, 0x0F, 0x3E, 0xFE, 0xFF, 0xFF, 0x3F, 0xFE, 0xDF, 0xFF, 0x1F, 0xFC, 0xCF, 0xFF, 0x0F, 0xF8, 0x87, 0xFF, 0x07, 0xF0, 0x01, 0xFF, 0x03, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 8
-        0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x60, 0xF8, 0xFF, 0x03, 0xE0, 0xFC, 0xFF, 0x07, 0xF0, 0xFC, 0xFF, 0x07, 0xF0, 0x7E, 0xE0, 0x0F, 0xF8, 0x1E, 0x80, 0x0F, 0x78, 0x0F, 0x00, 0x0F, 0x7C, 0x0F, 0x00, 0x0F, 0x7C, 0x0F, 0x00, 0x0F, 0x3E, 0x0F, 0x00, 0x0F, 0x3F, 0x1F, 0x00, 0x87, 0x1F, 0x3F, 0x80, 0xE7, 0x1F, 0xFE, 0xC1, 0xFB, 0x0F, 0xFE, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, 0x01, 0xF0, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0x00, 0xFF, 0x03, 0x00,  // Code for char 9
-        0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0xC0, 0x07, 0xF0, 0x07, 0xE0, 0x0F, 0xF8, 0x07, 0xF0, 0x0F, 0xF8, 0x07, 0xF0, 0x0F, 0xF8, 0x07, 0xF0, 0x0F, 0xF8, 0x07, 0xF0, 0x0F, 0xF8, 0x03, 0xF0, 0x07, 0xF0, 0x01, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   // Code for char :
-};
-
-// Based on https://github.com/adafruit/Adafruit_SSD1306
-
-#define SSD1306_SETLOWCOLUMN 0x00
-#define SSD1306_SETHIGHCOLUMN 0x10
-#define SSD1306_MEMORYMODE 0x20
-#define SSD1306_SETSTARTLINE 0x40
-#define SSD1306_SETCONTRAST 0x81
-#define SSD1306_CHARGEPUMP 0x8D
-#define SSD1306_SEGREMAP 0xA0
-#define SSD1306_DISPLAYALLON_RESUME 0xA4
-#define SSD1306_DISPLAYALLON 0xA5
-#define SSD1306_NORMALDISPLAY 0xA6
-#define SSD1306_INVERTDISPLAY 0xA7
-#define SSD1306_SETMULTIPLEX 0xA8
-#define SSD1306_DISPLAYOFF 0xAE
-#define SSD1306_DISPLAYON 0xAF
-#define SSD1306_SETSTARTPAGE 0xB0
-#define SSD1306_COMSCANINC 0xC0
-#define SSD1306_COMSCANDEC 0xC8
-#define SSD1306_SETDISPLAYOFFSET 0xD3
-#define SSD1306_SETCOMPINS 0xDA
-#define SSD1306_SETVCOMDETECT 0xDB
-#define SSD1306_SETDISPLAYCLOCKDIV 0xD5
-#define SSD1306_SETPRECHARGE 0xD9
-#define SSD1306_NOP 0xE3
-
-static const byte display_init_cmds[] = {
-  SSD1306_DISPLAYOFF,
-  SSD1306_SETDISPLAYCLOCKDIV, 0x80,  // the suggested ratio 0x80
-  SSD1306_SETMULTIPLEX, 0x1F,        // ratio 32
-  SSD1306_SETDISPLAYOFFSET,0x0,      // no offset
-  SSD1306_SETSTARTLINE | 0x0,        // line #0
-  SSD1306_CHARGEPUMP, 0x14,          // internal vcc
-  SSD1306_MEMORYMODE, 0x02,          // page mode
-  SSD1306_SEGREMAP | 0x0,            // column 0 mapped to SEG0
-  SSD1306_COMSCANINC,                // column scan direction not reversed
-  SSD1306_SETCOMPINS, 0x02,          // sequential COM pins, disable remap
-  SSD1306_SETCONTRAST, 0x7F,         // contrast level 127
-  SSD1306_SETPRECHARGE, 0xF1,        // pre-charge period (1, 15)
-  SSD1306_SETVCOMDETECT, 0x40,       // vcomh regulator level-
-  SSD1306_DISPLAYALLON_RESUME,
-  SSD1306_NORMALDISPLAY,
-  SSD1306_DISPLAYON,
-};
-
-static void display_cmd(byte cmd)
-{
-  LL_I2C_ClearFlag_STOP(I2C1);
-  LL_I2C_HandleTransfer(I2C1, 0x79, LL_I2C_ADDRSLAVE_7BIT, 2, LL_I2C_MODE_AUTOEND, LL_I2C_GENERATE_START_WRITE);
-  while (!LL_I2C_IsActiveFlag_TXE(I2C1))
-    ;
-  LL_I2C_TransmitData8(I2C1, 0x00);            // Will send a command
-  while (!LL_I2C_IsActiveFlag_TXE(I2C1))
-    ;
-  LL_I2C_TransmitData8(I2C1, cmd);
-  while (!LL_I2C_IsActiveFlag_STOP(I2C1))
-    ;
-}
-
-static void display_data_start(uint cnt)
-{
-  LL_I2C_ClearFlag_STOP(I2C1);
-  LL_I2C_HandleTransfer(I2C1, 0x79, LL_I2C_ADDRSLAVE_7BIT, cnt + 1, LL_I2C_MODE_AUTOEND, LL_I2C_GENERATE_START_WRITE);
-  while (!LL_I2C_IsActiveFlag_TXE(I2C1))
-    ;
-  LL_I2C_TransmitData8(I2C1, 0x40);            // Will send data
-}
-
-static void display_data(byte d)
-{
-  while (!LL_I2C_IsActiveFlag_TXE(I2C1))
-    ;
-  LL_I2C_TransmitData8(I2C1, d);
-}
-
-static void display_data_end(void)
-{
-  while (!LL_I2C_IsActiveFlag_STOP(I2C1))
-    ;
-}
-
-static void display_init(void)
-{
-  for (uint i=0; i < sizeof(display_init_cmds); i++)
-    display_cmd(display_init_cmds[i]);
-
-  for (uint p=0; p<4; p++)
-    {
-      display_cmd(SSD1306_SETSTARTPAGE + p);
-      display_cmd(SSD1306_SETHIGHCOLUMN);
-      display_cmd(SSD1306_SETLOWCOLUMN);
-      display_data_start(128);
-      for (uint i=0; i<128; i++)
-       {
-         byte x = 0;
-         // x = Gentium23x32[(23*4+1)*(i/23) + 1 + 4*(i%23) + p];
-         display_data(x);
-       }
-      display_data_end();
-    }
-}
-
-static void counter(uint cnt)
-{
-  byte d[5];
-  for (uint i=0; i<5; i++)
-    {
-      d[4-i] = cnt % 10;
-      cnt /= 10;
-    }
-
-  for (uint p=0; p<4; p++)
-    {
-      display_cmd(SSD1306_SETSTARTPAGE + p);
-      display_cmd(SSD1306_SETHIGHCOLUMN);
-      display_cmd(SSD1306_SETLOWCOLUMN);
-      display_data_start(5*24);
-      for (uint i=0; i<5; i++)
-       {
-         for (uint j=0; j<23; j++)
-           {
-             byte x = Gentium23x32[(23*4+1)*d[i] + 1 + 4*j + p];
-             display_data(x);
-           }
-         display_data(0);
-       }
-      display_data_end();
-    }
-}
-
 void run_test(void)
 {
   uint cnt = 0;
 
-  debug_puts("Init\r\n");
-  display_init();
-
   for (;;)
     {
-      LL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
-
-      debug_printf("Tick tock: %d\r\n", cnt);
-
-      counter(cnt);
-
-      LL_mDelay(1000);
+      debug_printf(">>> %d\r\n", cnt);
       cnt++;
-    }
-}
-
-#else
-
-// DS18B20 Temperature Sensor
-
-static volatile uint32_t ds_dma_buffer;
-
-static void ds_reset(void)
-{
-  // debug_puts("DS18B20: Reset\r\n");
-  LL_TIM_DisableCounter(TIM3);
-  LL_TIM_SetOnePulseMode(TIM3, LL_TIM_ONEPULSEMODE_SINGLE);
-
-  // DMA for reading pin state
-  ds_dma_buffer = 0xdeadbeef;
-  LL_DMA_SetMemoryAddress(DMA1, LL_DMA_CHANNEL_4, (uint32_t) &ds_dma_buffer);
-  LL_DMA_SetPeriphAddress(DMA1, LL_DMA_CHANNEL_4, (uint32_t) &THERMO_GPIO_Port->IDR);
-  LL_DMA_SetDataLength(DMA1, LL_DMA_CHANNEL_4, 1);
-  LL_DMA_EnableChannel(DMA1, LL_DMA_CHANNEL_4);
-
-  LL_TIM_OC_InitTypeDef oc;
-
-  // CC1 is used to drive the DMA (read line state at specified time)
-  LL_TIM_OC_StructInit(&oc);
-  oc.OCMode = LL_TIM_OCMODE_FROZEN;
-  oc.CompareValue = 560;
-  LL_TIM_OC_Init(TIM3, LL_TIM_CHANNEL_CH1, &oc);
-  LL_TIM_EnableDMAReq_CC1(TIM3);
-  LL_TIM_CC_SetDMAReqTrigger(TIM3, LL_TIM_CCDMAREQUEST_CC);
-
-  // CC2 is used to generate pulses (return line to idle state at specified time)
-  LL_TIM_OC_StructInit(&oc);
-  oc.OCMode = LL_TIM_OCMODE_FORCED_ACTIVE;
-  oc.OCState = LL_TIM_OCSTATE_ENABLE;
-  oc.CompareValue = 480;
-  oc.OCPolarity = LL_TIM_OCPOLARITY_LOW;
-  LL_TIM_OC_Init(TIM3, LL_TIM_CHANNEL_CH2, &oc);
-
-  // Set timer period to the length of the whole transaction
-  LL_TIM_SetAutoReload(TIM3, 999);
-
-  // Pull line down and start timer
-  LL_TIM_OC_SetMode(TIM3, LL_TIM_CHANNEL_CH2, LL_TIM_OCMODE_INACTIVE);
-  LL_TIM_EnableCounter(TIM3);
-
-  // Wait until the timer expires
-  while (LL_TIM_IsEnabledCounter(TIM3))
-    ;
-  // Counter is automatically disabled at the end of cycle
-
-  // Disable DMA
-  LL_TIM_DisableDMAReq_CC1(TIM3);
-  LL_DMA_DisableChannel(DMA1, LL_DMA_CHANNEL_4);
-
-  // debug_printf("Init DMA: %08x [%u] (%u remains)\r\n", ds_dma_buffer, !!(ds_dma_buffer & THERMO_Pin), LL_DMA_GetDataLength(DMA1, LL_DMA_CHANNEL_4));
-}
-
-static void ds_send_byte(byte b)
-{
-  // debug_printf("DS write: %02x\r\n", b);
-  LL_TIM_SetAutoReload(TIM3, 99);      // Each write slot takes 100μs
-  for (uint m=1; m < 0x100; m <<= 1)
-    {
-      LL_TIM_OC_SetCompareCH2(TIM3, ((b & m) ? 1 : 89));       // 1: 1μs pulse, 0: 89μs pulse
-      LL_TIM_OC_SetMode(TIM3, LL_TIM_CHANNEL_CH2, LL_TIM_OCMODE_FORCED_ACTIVE);
-      LL_TIM_OC_SetMode(TIM3, LL_TIM_CHANNEL_CH2, LL_TIM_OCMODE_INACTIVE);
-      LL_TIM_EnableCounter(TIM3);
-      while (LL_TIM_IsEnabledCounter(TIM3))
-       ;
-    }
-}
-
-static byte ds_recv_byte(void)
-{
-  LL_TIM_SetAutoReload(TIM3, 79);      // Each read slot takes 80μs
-  LL_TIM_OC_SetCompareCH2(TIM3, 1);    // Generate 1μs pulse to start read slot
-  LL_TIM_OC_SetCompareCH1(TIM3, 8);    // Sample data 8μs after start of slot
-  LL_TIM_EnableDMAReq_CC1(TIM3);
-
-  uint out = 0;
-  for (uint m=1; m < 0x100; m <<= 1)
-    {
-  ds_dma_buffer = 0xdeadbeef;
-  LL_DMA_SetDataLength(DMA1, LL_DMA_CHANNEL_4, 1);
-  LL_DMA_EnableChannel(DMA1, LL_DMA_CHANNEL_4);
-      LL_TIM_OC_SetMode(TIM3, LL_TIM_CHANNEL_CH2, LL_TIM_OCMODE_FORCED_ACTIVE);
-      LL_TIM_OC_SetMode(TIM3, LL_TIM_CHANNEL_CH2, LL_TIM_OCMODE_INACTIVE);
-      LL_TIM_EnableCounter(TIM3);
-      while (LL_TIM_IsEnabledCounter(TIM3))
-       ;
-      // FIXME: Using the Pin constant directly is fragile!
-      // debug_printf("XXX %08x\r\n", ds_dma_buffer);
-      if (ds_dma_buffer & THERMO_Pin)
-       out |= m;
-  LL_DMA_DisableChannel(DMA1, LL_DMA_CHANNEL_4);
-    }
-
-  LL_TIM_DisableDMAReq_CC1(TIM3);
-  // debug_printf("DS read: %02x\r\n", out);
-  return out;
-}
-
-static byte ds_buf[10];
-
-static int ds_recv_block(uint n)
-{
-  uint crc = 0;
-  for (uint i=0; i<n; i++)
-    {
-      uint b = ds_recv_byte();
-      ds_buf[i] = b;
-      for (uint j=0; j<8; j++)
-       {
-         uint k = (b & 1) ^ (crc >> 7);
-         crc = (crc << 1) & 0xff;
-         if (k)
-           crc ^= 0x31;
-         b >>= 1;
-       }
-    }
-
-  if (crc)
-    {
-      debug_printf("WARNING: Invalid CRC %02x\r\n", crc);
-      return 0;
-    }
-  return 1;
-}
-
-void run_test(void)
-{
-  uint cnt = 0;
-
-  debug_puts("Init\r\n");
-  NVIC_DisableIRQ(TIM3_IRQn);  // One day, we will handle everything from interrupts...
-
-  // Identify device
-  ds_reset();
-  ds_send_byte(0x33);
-  ds_recv_block(8);
-
-  // FIXME: Configure precision
-
-  for (;;)
-    {
       LL_GPIO_SetOutputPin(LD2_GPIO_Port, LD2_Pin);
-      // debug_printf("Tick tock: %d\r\n", cnt);
-
-      // Start measurement
-      ds_reset();
-      ds_send_byte(0xcc);
-      ds_send_byte(0x44);
-      while (ds_recv_byte() != 0xff)
-       LL_mDelay(10);
-
-      // Read scratch pad
-      ds_reset();
-      ds_send_byte(0xcc);
-      ds_send_byte(0xbe);
-      ds_recv_block(9);
-      int t = (int16_t)(ds_buf[0] | (ds_buf[1] << 8));
-      t = t*1000/16;
-
+      LL_GPIO_SetOutputPin(MEGGY1_GPIO_Port, MEGGY1_Pin);
+      LL_GPIO_SetOutputPin(MEGGY2_GPIO_Port, MEGGY2_Pin);
+      LL_GPIO_SetOutputPin(MEGGY3_GPIO_Port, MEGGY3_Pin);
+      if (LL_GPIO_IsInputPinSet(BLUE_BUTTON_GPIO_Port, BLUE_BUTTON_Pin))
+       LL_GPIO_SetOutputPin(MEGGY4_GPIO_Port, MEGGY4_Pin);
+      LL_mDelay(100);
       LL_GPIO_ResetOutputPin(LD2_GPIO_Port, LD2_Pin);
-      debug_printf("Temp: %d.%03d degC\r\n", t/1000, t%1000);
-
-      LL_mDelay(1000);
-      cnt++;
+      LL_GPIO_ResetOutputPin(MEGGY1_GPIO_Port, MEGGY1_Pin);
+      LL_GPIO_ResetOutputPin(MEGGY2_GPIO_Port, MEGGY2_Pin);
+      LL_GPIO_ResetOutputPin(MEGGY3_GPIO_Port, MEGGY3_Pin);
+      LL_GPIO_ResetOutputPin(MEGGY4_GPIO_Port, MEGGY4_Pin);
+      LL_mDelay(100);
     }
 }
-
-#endif
index 500b16413a3e1ba12c3ec318587b7c630932eca7..65c6d63f50a82e24dd40af9f26ce81a1dfa42a40 100644 (file)
@@ -9,21 +9,6 @@
 \r
 <filestoremove>\r
     <file>\r
-    <name>Src/stm32f0xx_hal_msp.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c</name>\r
-    <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c</name>\r
     </file>\r
 </filestoremove>\r
 \r
@@ -32,7 +17,6 @@
           <include></include>\r
     </Aincludes>\r
        <Cincludes>\r
-                       <include>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Inc/Legacy</include>\r
     </Cincludes>\r
 </inctoremove>\r
 \r
index 0873135cbaf4e40a9b752266a9054890132cb9cd..c3b67d8533370a62779734845b033823c3e6585e 100644 (file)
@@ -25,22 +25,27 @@ Mcu.Name=STM32F030R8Tx
 Mcu.Package=LQFP64
 Mcu.Pin0=PC13
 Mcu.Pin1=PC14-OSC32_IN
-Mcu.Pin10=PA13
-Mcu.Pin11=PA14
-Mcu.Pin12=PB8
-Mcu.Pin13=PB9
-Mcu.Pin14=VP_SYS_VS_Systick
-Mcu.Pin15=VP_TIM3_VS_ClockSourceINT
-Mcu.Pin16=VP_TIM3_VS_no_output1
+Mcu.Pin10=PB12
+Mcu.Pin11=PB13
+Mcu.Pin12=PB14
+Mcu.Pin13=PB15
+Mcu.Pin14=PC9
+Mcu.Pin15=PA13
+Mcu.Pin16=PA14
+Mcu.Pin17=PB8
+Mcu.Pin18=PB9
+Mcu.Pin19=VP_SYS_VS_Systick
 Mcu.Pin2=PC15-OSC32_OUT
+Mcu.Pin20=VP_TIM3_VS_ClockSourceINT
+Mcu.Pin21=VP_TIM3_VS_no_output1
 Mcu.Pin3=PF0-OSC_IN
 Mcu.Pin4=PF1-OSC_OUT
 Mcu.Pin5=PA2
 Mcu.Pin6=PA3
-Mcu.Pin7=PA5
-Mcu.Pin8=PA7
-Mcu.Pin9=PC9
-Mcu.PinsNb=17
+Mcu.Pin7=PF4
+Mcu.Pin8=PA5
+Mcu.Pin9=PA7
+Mcu.PinsNb=22
 Mcu.ThirdPartyNb=0
 Mcu.UserConstants=
 Mcu.UserName=STM32F030R8Tx
@@ -91,6 +96,22 @@ PA7.GPIO_Label=THERMO
 PA7.GPIO_ModeDefaultPP=GPIO_MODE_AF_OD
 PA7.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
 PA7.Signal=S_TIM3_CH2
+PB12.GPIOParameters=GPIO_Label
+PB12.GPIO_Label=MEGGY1
+PB12.Locked=true
+PB12.Signal=GPIO_Output
+PB13.GPIOParameters=GPIO_Label
+PB13.GPIO_Label=MEGGY2
+PB13.Locked=true
+PB13.Signal=GPIO_Output
+PB14.GPIOParameters=GPIO_Label
+PB14.GPIO_Label=MEGGY3
+PB14.Locked=true
+PB14.Signal=GPIO_Output
+PB15.GPIOParameters=GPIO_Label
+PB15.GPIO_Label=MEGGY4
+PB15.Locked=true
+PB15.Signal=GPIO_Output
 PB8.Locked=true
 PB8.Mode=I2C
 PB8.Signal=I2C1_SCL
@@ -125,6 +146,8 @@ PF0-OSC_IN.Mode=HSE-External-Clock-Source
 PF0-OSC_IN.Signal=RCC_OSC_IN
 PF1-OSC_OUT.Locked=true
 PF1-OSC_OUT.Signal=RCC_OSC_OUT
+PF4.Locked=true
+PF4.Signal=GPIO_Input
 PinOutPanel.RotationAngle=0
 ProjectManager.AskForMigrate=true
 ProjectManager.BackupPrevious=false