Skip to content

Commit

Permalink
Renesas RX workflow action (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwinter authored Jan 12, 2021
1 parent 7c0d9df commit 23cf8dd
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/RSK-RX65N-2MB.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: RSK-RX65N-2MB

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

defaults:
run:
working-directory: Renesas/RSK_RX65N_2MB

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive

- name: rx-elf-gcc
uses: ryanwinter/rx-elf-gcc@main
with:
release: '8.3.0.202004'

- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v3

- name: Build project
run: |
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/renesas-rx-gcc-rx65n.cmake"
cmake --build build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
![](https://github.com/azure-rtos/getting-started/workflows/Markdown%20links/badge.svg)
![](https://github.com/azure-rtos/getting-started/workflows/ATSAME54-XPRO/badge.svg)
![](https://github.com/azure-rtos/getting-started/workflows/AZ3166/badge.svg)
![](https://github.com/azure-rtos/getting-started/workflows/MIMXRT1050-EVKB/badge.svg)
![](https://github.com/azure-rtos/getting-started/workflows/MIMXRT1060-EVK/badge.svg)
![](https://github.com/azure-rtos/getting-started/workflows/RSK-RX65N-2MB/badge.svg)
![](https://github.com/azure-rtos/getting-started/workflows/STM32L4_L4+/badge.svg)
![](https://github.com/azure-rtos/getting-started/workflows/Markdown%20links/badge.svg)

# Getting Started with Azure RTOS and Azure IoT

Expand Down
5 changes: 5 additions & 0 deletions core/src/sntp_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static void set_sntp_time()
{
ULONG seconds;
ULONG milliseconds;
ULONG previous_time;
UINT status;
CHAR time_buffer[64];

Expand All @@ -81,6 +82,9 @@ static void set_sntp_time()
return;
}

// calculate the time correction for printout
previous_time = sntp_time_get();

tx_mutex_get(&time_mutex, TX_WAIT_FOREVER);

// Stash the Unix and ThreadX times
Expand All @@ -100,6 +104,7 @@ static void set_sntp_time()
else
{
printf("SNTP time update: %s\r\n", time_buffer);
printf("\tdrift correction: %lu seconds\r\n", sntp_time_get() - previous_time);
}

// Flag the sync was successful
Expand Down

0 comments on commit 23cf8dd

Please sign in to comment.