diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..8c568c08 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode +out + diff --git a/applications/app/BUILD.gn b/applications/app/BUILD.gn index 0caa916f..4a475062 100644 --- a/applications/app/BUILD.gn +++ b/applications/app/BUILD.gn @@ -28,7 +28,7 @@ lite_component("app") { # "TW104_ADC_voltage:adc_voltage", # "TW105_I2C_sht30:i2c_sht30", # "TW106_UART:uart_test", - # "TW301_APP_oled:oled_demo", - # "TW302_APP_nfc:app_nfc_example" + # "TW201_APP_oled:oled_demo", + # "TW202_APP_nfc:app_nfc_example" ] } diff --git a/applications/app/TW001_OS_helloworld/hello_world.c b/applications/app/TW001_OS_helloworld/hello_world.c index a38f9988..19a37f83 100644 --- a/applications/app/TW001_OS_helloworld/hello_world.c +++ b/applications/app/TW001_OS_helloworld/hello_world.c @@ -26,4 +26,4 @@ void HelloWorld(void) return; } -SYS_RUN(HelloWorld); +APP_FEATURE_INIT(HelloWorld); diff --git a/applications/app/TW005_OS_mutex/os_mutex_example.c b/applications/app/TW005_OS_mutex/os_mutex_example.c index 5d1074e7..c020d2bf 100644 --- a/applications/app/TW005_OS_mutex/os_mutex_example.c +++ b/applications/app/TW005_OS_mutex/os_mutex_example.c @@ -82,4 +82,5 @@ void os_mutex_example(void) printf("create Mutex failed!\n"); } } + APP_FEATURE_INIT(os_mutex_example); diff --git a/applications/app/TW101_GPIO_led/led_example.c b/applications/app/TW101_GPIO_led/led_example.c index c16f8960..7c0b6659 100644 --- a/applications/app/TW101_GPIO_led/led_example.c +++ b/applications/app/TW101_GPIO_led/led_example.c @@ -63,4 +63,4 @@ static void IotGpioTurnOnLedLight(void) return; } -SYS_RUN(IotGpioTurnOnLedLight); +APP_FEATURE_INIT(IotGpioTurnOnLedLight); diff --git a/applications/app/TW102_EXTI_key/exti_example.c b/applications/app/TW102_EXTI_key/exti_example.c index ae36a9ee..1a52841e 100644 --- a/applications/app/TW102_EXTI_key/exti_example.c +++ b/applications/app/TW102_EXTI_key/exti_example.c @@ -93,4 +93,4 @@ static void IotGpioClickKey(void) return; } -SYS_RUN(IotGpioClickKey); +APP_FEATURE_INIT(IotGpioClickKey); diff --git a/applications/app/TW103_PWM_led/pwm_led_example.c b/applications/app/TW103_PWM_led/pwm_led_example.c index ba8ac728..6202ca05 100644 --- a/applications/app/TW103_PWM_led/pwm_led_example.c +++ b/applications/app/TW103_PWM_led/pwm_led_example.c @@ -87,4 +87,4 @@ static void IotGpioBreathingLedLamp(void) return; } -SYS_RUN(IotGpioBreathingLedLamp); +APP_FEATURE_INIT(IotGpioBreathingLedLamp); diff --git a/applications/app/TW104_ADC_voltage/adc_voltage.c b/applications/app/TW104_ADC_voltage/adc_voltage.c index 55669591..12fa3793 100644 --- a/applications/app/TW104_ADC_voltage/adc_voltage.c +++ b/applications/app/TW104_ADC_voltage/adc_voltage.c @@ -68,4 +68,4 @@ static void adcVoltageEntry(void) return; } -SYS_RUN(adcVoltageEntry); +APP_FEATURE_INIT(adcVoltageEntry); diff --git a/applications/app/TW105_I2C_sht30/i2c_sht30.c b/applications/app/TW105_I2C_sht30/i2c_sht30.c index 861cf5a3..5d9c8c8e 100644 --- a/applications/app/TW105_I2C_sht30/i2c_sht30.c +++ b/applications/app/TW105_I2C_sht30/i2c_sht30.c @@ -49,4 +49,4 @@ static void i2cSht30Entry(void) return; } -SYS_RUN(i2cSht30Entry); +APP_FEATURE_INIT(i2cSht30Entry); diff --git a/applications/app/TW106_UART/uart_test.c b/applications/app/TW106_UART/uart_test.c index ea100a7a..4457aa60 100644 --- a/applications/app/TW106_UART/uart_test.c +++ b/applications/app/TW106_UART/uart_test.c @@ -85,4 +85,4 @@ static void uartEntry(void) return; } -SYS_RUN(uartEntry); +APP_FEATURE_INIT(uartEntry); diff --git a/applications/app/TW301_APP_oled/BUILD.gn b/applications/app/TW201_APP_oled/BUILD.gn similarity index 100% rename from applications/app/TW301_APP_oled/BUILD.gn rename to applications/app/TW201_APP_oled/BUILD.gn diff --git a/applications/app/TW301_APP_oled/README.md b/applications/app/TW201_APP_oled/README.md similarity index 97% rename from applications/app/TW301_APP_oled/README.md rename to applications/app/TW201_APP_oled/README.md index 13c28c6a..93848d76 100644 --- a/applications/app/TW301_APP_oled/README.md +++ b/applications/app/TW201_APP_oled/README.md @@ -1,4 +1,4 @@ -# OpenHarmony驱动子系统开发—IIC_Oled显示 +# OpenHarmony驱动子系统开发-----IIC_OLED显示 ## 概述 I2C(Inter Integrated Circuit)总线是由Philips公司开发的一种简单、双向二线制同步串行总线。 diff --git a/applications/app/TW301_APP_oled/oled_demo.c b/applications/app/TW201_APP_oled/oled_demo.c similarity index 99% rename from applications/app/TW301_APP_oled/oled_demo.c rename to applications/app/TW201_APP_oled/oled_demo.c index 1b7f5f34..eead32b3 100644 --- a/applications/app/TW301_APP_oled/oled_demo.c +++ b/applications/app/TW201_APP_oled/oled_demo.c @@ -375,5 +375,5 @@ void my_oled_demo(void) //} } -SYS_RUN(my_oled_demo); +APP_FEATURE_INIT(my_oled_demo); diff --git a/applications/app/TW301_APP_oled/oled_demo.h b/applications/app/TW201_APP_oled/oled_demo.h similarity index 100% rename from applications/app/TW301_APP_oled/oled_demo.h rename to applications/app/TW201_APP_oled/oled_demo.h diff --git a/applications/app/TW301_APP_oled/oledfont.h b/applications/app/TW201_APP_oled/oledfont.h similarity index 95% rename from applications/app/TW301_APP_oled/oledfont.h rename to applications/app/TW201_APP_oled/oledfont.h index a1501304..41ee8183 100644 --- a/applications/app/TW301_APP_oled/oledfont.h +++ b/applications/app/TW201_APP_oled/oledfont.h @@ -1,11 +1,21 @@ +/* + * Copyright (c) 2021 Talkweb Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef __OLEDFONT_H #define __OLEDFONT_H -//锟斤拷锟斤拷ASCII锟斤拷 -//偏锟斤拷锟斤拷32 -//ASCII锟街凤拷锟斤拷 -//偏锟斤拷锟斤拷32 -//锟斤拷小:12*6 -/************************************6*8锟侥碉拷锟斤拷************************************/ + +/************************************6*8 ASCII************************************/ const unsigned char asc2_1206[95][12]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/ {0x00,0x00,0x00,0x00,0x3F,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/ @@ -104,7 +114,7 @@ const unsigned char asc2_1206[95][12]={ {0x40,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x40,0x00},/*"~",94*/ }; -//16*16 ASCII瀛楃闆嗙偣闃� +//16*16 ASCII const unsigned char asc2_1608[95][16]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/ {0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCC,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/