Skip to content

Commit dfb8bb9

Browse files
authored
[Ameba] Add platform changes (#32682)
* [Ameba] Add platform changes * [Ameba] add platform changes when getting system time * [Ameba] add wifi wrapper to fix build issue * [Ameba] add wifi wrapper to fix build issue * [Ameba] Update ci to version 42 * [Ameba] add plaform connectivity changes * [Ameba] add plaform connectivity changes
1 parent 5751750 commit dfb8bb9

File tree

9 files changed

+19
-15
lines changed

9 files changed

+19
-15
lines changed

.github/workflows/examples-ameba.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
if: github.actor != 'restyled-io[bot]'
3737

3838
container:
39-
image: ghcr.io/project-chip/chip-build-ameba:41
39+
image: ghcr.io/project-chip/chip-build-ameba:42
4040
options: --user root
4141

4242
steps:

examples/all-clusters-app/ameba/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ The CHIP demo application is supported on
2727

2828
- Pull docker image:
2929

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

3232
- Run docker container:
3333

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

3636
- Setup build environment:
3737

examples/light-switch-app/ameba/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ The CHIP demo application is supported on
2626

2727
- Pull docker image:
2828

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

3131
- Run docker container:
3232

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

3535
- Setup build environment:
3636

examples/lighting-app/ameba/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ The CHIP demo application is supported on
2323

2424
- Pull docker image:
2525

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

2828
- Run docker container:
2929

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

3232
- Setup build environment:
3333

examples/ota-requestor-app/ameba/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities.
66

77
- Pull docker image:
88

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

1111
- Run docker container:
1212

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

1515
- Setup build environment:
1616

examples/pigweed-app/ameba/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ following features are available:
3131

3232
- Pull docker image:
3333

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

3636
- Run docker container:
3737

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

4040
- Setup build environment:
4141

src/platform/Ameba/ConnectivityManagerImpl.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ void ConnectivityManagerImpl::DriveStationState()
500500
mLastStationConnectFailTime = System::Clock::kZero;
501501
OnStationConnected();
502502
}
503+
else
504+
{
505+
ChangeWiFiStationState(kWiFiStationState_Connecting);
506+
}
503507
}
504508

505509
// Otherwise the station interface is NOT connected to an AP, so...

src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ CHIP_ERROR AmebaWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLe
128128
{
129129
CHIP_ERROR err = CHIP_NO_ERROR;
130130
bool connected;
131-
131+
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
132132
// If device is already connected to WiFi, then disconnect the WiFi,
133133
chip::DeviceLayer::Internal::AmebaUtils::IsStationConnected(connected);
134134
if (connected)
@@ -159,7 +159,7 @@ CHIP_ERROR AmebaWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLe
159159
ConnectivityMgrImpl().ChangeWiFiStationState(state);
160160
chip::DeviceLayer::Internal::AmebaUtils::WiFiConnect(ssid, key);
161161
});
162-
162+
#endif
163163
return err;
164164
}
165165

src/platform/Ameba/SystemTimeSupport.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ ClockImpl gClockImpl;
4848

4949
Microseconds64 ClockImpl::GetMonotonicMicroseconds64(void)
5050
{
51-
return (Clock::Microseconds64(xTaskGetTickCount()) * configTICK_RATE_HZ);
51+
return Clock::Microseconds64(ameba_get_clock_time());
5252
}
5353

5454
Milliseconds64 ClockImpl::GetMonotonicMilliseconds64(void)
5555
{
56-
return (Clock::Milliseconds64(xTaskGetTickCount()));
56+
return std::chrono::duration_cast<Milliseconds64>(GetMonotonicMicroseconds64());
5757
}
5858

5959
CHIP_ERROR ClockImpl::GetClock_RealTime(Clock::Microseconds64 & curTime)

0 commit comments

Comments
 (0)