浏览代码

minor tweaks

philippe44 5 年之前
父节点
当前提交
a0b3452dd7

+ 1 - 1
components/display/display.c

@@ -26,7 +26,7 @@
 #include "embedded.h"
 #include "display.h"
 
-#define TAG 		"display"
+static const char *TAG = "display";
 
 static bool (*slimp_handler_chain)(u8_t *data, int len);
 static struct display_handle_s *handle;

+ 1 - 1
components/display/driver_SSD1306.c

@@ -32,7 +32,7 @@
 #define I2C_PORT 	1
 #define I2C_ADDRESS	0x3C
 #define LINELEN		40
-#define TAG 		"display"
+static const char *TAG = "display";
 
 static void 	vfdc_handler( u8_t *_data, int bytes_read);
 static void 	grfe_handler( u8_t *data, int len);

+ 2 - 1
components/display/tarablessd1306/ssd1306.c

@@ -200,7 +200,8 @@ static bool SSD1306_Init( struct SSD1306_Device* DeviceHandle, int Width, int He
     DeviceHandle->Height = Height;
     DeviceHandle->FramebufferSize = ( DeviceHandle->Width * Height ) / 8;
 
-    DeviceHandle->Framebuffer = heap_caps_calloc( 1, DeviceHandle->FramebufferSize, MALLOC_CAP_DMA | MALLOC_CAP_8BIT );
+    // DeviceHandle->Framebuffer = heap_caps_calloc( 1, DeviceHandle->FramebufferSize, MALLOC_CAP_INTERNAL );
+	DeviceHandle->Framebuffer = calloc( 1, DeviceHandle->FramebufferSize );
 
     NullCheck( DeviceHandle->Framebuffer, return false );
 

+ 1 - 1
components/services/battery.c

@@ -19,7 +19,7 @@
 
 #define BATTERY_TIMER	(10*1000)
 
-static const char TAG[] = "battery";
+static const char *TAG = "battery";
 
 static struct {
 	float sum, avg;

+ 1 - 1
components/services/led.c

@@ -21,7 +21,7 @@
 #define MAX_LED	8
 #define BLOCKTIME	10	// up to portMAX_DELAY
 
-static const char TAG[] = "led";
+static const char *TAG = "led";
 
 static struct led_s {
 	gpio_num_t gpio;

+ 1 - 1
components/services/monitor.c

@@ -26,7 +26,7 @@
 
 #define MONITOR_TIMER	(10*1000)
 
-static const char TAG[] = "monitor";
+static const char *TAG = "monitor";
 
 static TimerHandle_t monitor_timer;