Skip to content

Commit

Permalink
Restyled by gn
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and wy-hh committed Feb 10, 2025
1 parent a531c2a commit c49a75e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 30 deletions.
14 changes: 7 additions & 7 deletions examples/contact-sensor-app/bouffalolab/bl702l/app_pds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime)
{
extern void * pxCurrentTCB;

ChipLogProgress(NotSpecified, "wakeup source: rtc. %lu vs %lu ms @ %lu\r\n", xExpectedIdleTime,
(uint32_t) (bl_rtc_get_timestamp_ms() - sleep_before), (uint32_t) bl_rtc_get_timestamp_ms());
// ChipLogProgress(NotSpecified, "wakeup source: rtc. %lu vs %lu ms @ %lu\r\n", xExpectedIdleTime,
// (uint32_t) (bl_rtc_get_timestamp_ms() - sleep_before), (uint32_t) bl_rtc_get_timestamp_ms());

ChipLogProgress(NotSpecified, "application_sleep; %lu, %lu, %lu\r\n", (uint32_t) sleep_calling_time, (uint32_t) sleep_time,
(uint32_t) wakeup_time);
// ChipLogProgress(NotSpecified, "application_sleep; %lu, %lu, %lu\r\n", (uint32_t) sleep_calling_time, (uint32_t) sleep_time,
// (uint32_t) wakeup_time);
}
else if (app_pds_wakeup_source == PDS_WAKEUP_BY_GPIO)
{
Expand All @@ -80,9 +80,9 @@ extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime)
app_pds_irq_handler(&gpio_contact);
}

ChipLogProgress(NotSpecified, "wakeup source: gpio -> 0x%08lX. %lu vs %lu ms @ %lu\r\n", app_pds_wakeup_pin,
xExpectedIdleTime, (uint32_t) (bl_rtc_get_timestamp_ms() - sleep_before),
(uint32_t) bl_rtc_get_timestamp_ms());
// ChipLogProgress(NotSpecified, "wakeup source: gpio -> 0x%08lX. %lu vs %lu ms @ %lu\r\n", app_pds_wakeup_pin,
// xExpectedIdleTime, (uint32_t) (bl_rtc_get_timestamp_ms() - sleep_before),
// (uint32_t) bl_rtc_get_timestamp_ms());
}

app_pds_wakeup_source = -1;
Expand Down
1 change: 0 additions & 1 deletion examples/lighting-app/bouffalolab/bl602/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ bouffalolab_executable("lighting_app") {
inputs = [ ldscript ]

if (chip_print_memory_usage) {

if (enable_lwip_pbuf_ram) {
ldflags += [ "-Wl,--defsym=__RAM_PBUF_POOL=0" ]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/bouffalolab/bl616/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bouffalolab_executable("lighting_app") {
if (enable_lwip_pbuf_ram) {
defines += [ "CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM=1" ]
}

defines += [ "BL616DK" ]

sources = [
Expand Down
12 changes: 4 additions & 8 deletions third_party/bouffalolab/bl602/bl_iot_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ template("bl_iot_sdk") {
rebase_path("${invoker.freertos_config}", root_build_dir),
]

if (defined(invoker.enable_lwip_pbuf_ram) &&
invoker.enable_lwip_pbuf_ram) {
if (defined(invoker.enable_lwip_pbuf_ram) && invoker.enable_lwip_pbuf_ram) {
defines += [ "CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM=1" ]
}
}
Expand Down Expand Up @@ -912,8 +911,7 @@ template("bl_iot_sdk") {
"${bl_iot_sdk_root}/components/network/lwip_dhcpd",
]

if (defined(invoker.enable_lwip_pbuf_ram) &&
invoker.enable_lwip_pbuf_ram) {
if (defined(invoker.enable_lwip_pbuf_ram) && invoker.enable_lwip_pbuf_ram) {
include_dirs += [ "${bouffalolab_iot_sdk_build_root}/patches/lwip" ]
}

Expand Down Expand Up @@ -951,11 +949,9 @@ template("bl_iot_sdk") {
"${bl_iot_sdk_root}/components/network/lwip/src/core/udp.c",
]

if (defined(invoker.enable_lwip_pbuf_ram) &&
invoker.enable_lwip_pbuf_ram) {
if (defined(invoker.enable_lwip_pbuf_ram) && invoker.enable_lwip_pbuf_ram) {
sources += [ "${bouffalolab_iot_sdk_build_root}/patches/lwip/mem.c" ]
}
else {
} else {
sources += [ "${bl_iot_sdk_root}/components/network/lwip/src/core/mem.c" ]
}

Expand Down
20 changes: 7 additions & 13 deletions third_party/bouffalolab/bl616/bouffalo_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ template("bouffalo_sdk") {
defines += invoker.defines
}

if (defined(invoker.enable_lwip_pbuf_ram) &&
invoker.enable_lwip_pbuf_ram) {
if (defined(invoker.enable_lwip_pbuf_ram) && invoker.enable_lwip_pbuf_ram) {
defines += [ "CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM=1" ]
}
}
Expand Down Expand Up @@ -418,6 +417,7 @@ template("bouffalo_sdk") {
include_dirs = [ "${bouffalo_sdk_root}/components/libc" ]

sources = [
"${bouffalo_sdk_root}/components/libc/assert.c",
"${bouffalo_sdk_root}/components/libc/newlib/port_init_fini.c",
"${bouffalo_sdk_root}/components/libc/newlib/port_memory.c",
"${bouffalo_sdk_root}/components/libc/newlib/syscalls_nosys.c",
Expand Down Expand Up @@ -463,7 +463,6 @@ template("bouffalo_sdk") {
"${bouffalo_sdk_root}/components/libc/nuttx/libc/string/lib_strtok.c",
"${bouffalo_sdk_root}/components/libc/nuttx/libc/string/lib_strtokr.c",
"${bouffalo_sdk_root}/components/libc/nuttx/libc/string/lib_vikmemcpy.c",
"${bouffalo_sdk_root}/components/libc/assert.c",
"${bouffalo_sdk_root}/components/libc/printf.c",
"${bouffalo_sdk_root}/components/libc/snprintf.c",
"${bouffalo_sdk_root}/components/libc/sprintf.c",
Expand Down Expand Up @@ -902,8 +901,7 @@ template("bouffalo_sdk") {
include_dirs +=
[ "${bouffalo_sdk_root}/components/net/lwip/lwip/src/apps/dhcpd" ]

if (defined(invoker.enable_lwip_pbuf_ram) &&
invoker.enable_lwip_pbuf_ram) {
if (defined(invoker.enable_lwip_pbuf_ram) && invoker.enable_lwip_pbuf_ram) {
include_dirs += [ "${bouffalolab_iot_sdk_build_root}/patches/lwip" ]
}

Expand Down Expand Up @@ -964,14 +962,10 @@ template("bouffalo_sdk") {
]

if (defined(invoker.enable_lwip_pbuf_ram) && invoker.enable_lwip_pbuf_ram) {
sources += [
"${bouffalolab_iot_sdk_build_root}/patches/lwip/mem.c",
]
}
else {
sources += [
"${bouffalo_sdk_root}/components/net/lwip/lwip/src/core/mem.c",
]
sources += [ "${bouffalolab_iot_sdk_build_root}/patches/lwip/mem.c" ]
} else {
sources +=
[ "${bouffalo_sdk_root}/components/net/lwip/lwip/src/core/mem.c" ]
}

sources += [
Expand Down

0 comments on commit c49a75e

Please sign in to comment.