Bläddra i källkod

Merge branch 'stm32f4xx' of git.shilov.pp.ua:shiva/Accum-Tester into stm32f4xx

Vladimir N. Shilov 1 vecka sedan
förälder
incheckning
523b6b3876
6 ändrade filer med 28 tillägg och 15 borttagningar
  1. 10 0
      Accum-Tester.code-workspace
  2. 1 1
      Makefile
  3. 13 10
      cfg/halconf.h
  4. 2 2
      readme.txt
  5. 1 1
      src/buttons.c
  6. 1 1
      src/main.c

+ 10 - 0
Accum-Tester.code-workspace

@@ -0,0 +1,10 @@
+{
+	"folders": [
+		{
+			"path": "."
+		}
+	],
+	"settings": {
+		"commentTranslate.multiLineMerge": true
+	}
+}

+ 1 - 1
Makefile

@@ -89,7 +89,7 @@ PROJECT = acc-tst
 MCU  = cortex-m4
 
 # Imported source files and paths.
-CHIBIOS  := C:/MCU/ChibiOS_21.11.2
+CHIBIOS  := C:/MCU/ChibiOS_21.11.3
 CONFDIR  := ./cfg
 BUILDDIR := ./build
 DEPDIR   := $(BUILDDIR)/.dep

+ 13 - 10
cfg/halconf.h

@@ -29,7 +29,7 @@
 #define HALCONF_H
 
 #define _CHIBIOS_HAL_CONF_
-#define _CHIBIOS_HAL_CONF_VER_8_0_
+#define _CHIBIOS_HAL_CONF_VER_8_4_
 
 #include "mcuconf.h"
 
@@ -320,7 +320,7 @@
  * @brief   Enables the zero-copy API.
  */
 #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY                   FALSE
+#define MAC_USE_ZERO_COPY                   TRUE
 #endif
 
 /**
@@ -335,15 +335,18 @@
 /*===========================================================================*/
 
 /**
- * @brief   Delays insertions.
- * @details If enabled this options inserts delays into the MMC waiting
- *          routines releasing some extra CPU time for the threads with
- *          lower priority, this may slow down the driver a bit however.
- *          This option is recommended also if the SPI driver does not
- *          use a DMA channel and heavily loads the CPU.
+ * @brief   Timeout before assuming a failure while waiting for card idle.
+ * @note    Time is in milliseconds.
+ */
+#if !defined(MMC_IDLE_TIMEOUT_MS) || defined(__DOXYGEN__)
+#define MMC_IDLE_TIMEOUT_MS                 1000
+#endif
+
+/**
+ * @brief   Mutual exclusion on the SPI bus.
  */
-#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING                    TRUE
+#if !defined(MMC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define MMC_USE_MUTUAL_EXCLUSION            TRUE
 #endif
 
 /*===========================================================================*/

+ 2 - 2
readme.txt

@@ -12,8 +12,8 @@ PA8	RELAY1 (Power)
 PD12	RELAY2 (Load)
 
 Soft:
-ChibiOS 21.11.x (trunk)
-uGFX 29 (trunk)
+ChibiOS 21.11.3
+uGFX 2.9-git.master
 
 Tasks:
  - выбор аккума вручную из списка (1-4S LiIon / SLA 12v)

+ 1 - 1
src/buttons.c

@@ -2,7 +2,7 @@
 #include <hal.h>
 #include "buttons.h"
 
-static btn_hndlr btnh[4];
+static btn_hndlr btnh[Button_Num];
 
 /* Constants */
 static const ioline_t button_Lines[Button_Num] = {

+ 1 - 1
src/main.c

@@ -71,7 +71,7 @@ typedef struct accum_profile {
   char * Description;
 } accum_profile_t;
 
-#define ACCUM_PRIFILE_NUM   3
+#define ACCUM_PRIFILE_NUM   4
 accum_profile_t Profile[ACCUM_PRIFILE_NUM] = {
   {"SLA", "12V", 12000, 15000, 10500, 3600, 240, {24,0,0}, "GP12120"},
   {"SLA", "6V", 1200, 7500, 5250, 360, 24, {24,0,0}, "GP6012"},