Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ameba] Add platform changes #32682

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/examples-ameba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-ameba:41
image: ghcr.io/project-chip/chip-build-ameba:42
options: --user root

steps:
Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ The CHIP demo application is supported on

- Pull docker image:

$ docker pull ghcr.io/project-chip/chip-build-ameba:35
$ docker pull ghcr.io/project-chip/chip-build-ameba:42

- Run docker container:

$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:35
$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:42

- Setup build environment:

Expand Down
4 changes: 2 additions & 2 deletions examples/light-switch-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ The CHIP demo application is supported on

- Pull docker image:

$ docker pull ghcr.io/project-chip/chip-build-ameba:35
$ docker pull ghcr.io/project-chip/chip-build-ameba:42

- Run docker container:

$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:35
$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:42

- Setup build environment:

Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ The CHIP demo application is supported on

- Pull docker image:

$ docker pull ghcr.io/project-chip/chip-build-ameba:35
$ docker pull ghcr.io/project-chip/chip-build-ameba:42

- Run docker container:

$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:35
$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:42

- Setup build environment:

Expand Down
4 changes: 2 additions & 2 deletions examples/ota-requestor-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities.

- Pull docker image:

$ docker pull ghcr.io/project-chip/chip-build-ameba:35
$ docker pull ghcr.io/project-chip/chip-build-ameba:42

- Run docker container:

$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:35
$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:42

- Setup build environment:

Expand Down
4 changes: 2 additions & 2 deletions examples/pigweed-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ following features are available:

- Pull docker image:

$ docker pull ghcr.io/project-chip/chip-build-ameba:35
$ docker pull ghcr.io/project-chip/chip-build-ameba:42

- Run docker container:

$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:35
$ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:42

- Setup build environment:

Expand Down
4 changes: 2 additions & 2 deletions src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ CHIP_ERROR AmebaWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLe
{
CHIP_ERROR err = CHIP_NO_ERROR;
bool connected;

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
// If device is already connected to WiFi, then disconnect the WiFi,
chip::DeviceLayer::Internal::AmebaUtils::IsStationConnected(connected);
if (connected)
Expand Down Expand Up @@ -159,7 +159,7 @@ CHIP_ERROR AmebaWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLe
ConnectivityMgrImpl().ChangeWiFiStationState(state);
chip::DeviceLayer::Internal::AmebaUtils::WiFiConnect(ssid, key);
});

#endif
return err;
}

Expand Down
4 changes: 2 additions & 2 deletions src/platform/Ameba/SystemTimeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ ClockImpl gClockImpl;

Microseconds64 ClockImpl::GetMonotonicMicroseconds64(void)
{
return (Clock::Microseconds64(xTaskGetTickCount()) * configTICK_RATE_HZ);
return Clock::Microseconds64(ameba_get_clock_time());
}

Milliseconds64 ClockImpl::GetMonotonicMilliseconds64(void)
{
return (Clock::Milliseconds64(xTaskGetTickCount()));
return std::chrono::duration_cast<Milliseconds64>(GetMonotonicMicroseconds64());
}

CHIP_ERROR ClockImpl::GetClock_RealTime(Clock::Microseconds64 & curTime)
Expand Down
Loading