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

Fix sleep signature (Add extern "C") #9720

Merged
merged 1 commit into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all 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 examples/shell/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void appError(int err)
;
}

unsigned int sleep(unsigned int seconds)
extern "C" unsigned int sleep(unsigned int seconds)
{
const TickType_t xDelay = 1000 * seconds / portTICK_PERIOD_MS;
vTaskDelay(xDelay);
Expand Down
2 changes: 1 addition & 1 deletion examples/shell/k32w/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ extern InitFunc __init_array_end;
/* needed for FreeRtos Heap 4 */
uint8_t __attribute__((section(".heap"))) ucHeap[0xF000];

unsigned int sleep(unsigned int seconds)
extern "C" unsigned int sleep(unsigned int seconds)
{
const TickType_t xDelay = 1000 * seconds / portTICK_PERIOD_MS;
vTaskDelay(xDelay);
Expand Down