2019-07-03 18:01:48 -07:00
|
|
|
/*
|
|
|
|
* os_access.h
|
|
|
|
*
|
|
|
|
* OS access is not part of global.h in order to help separate synchronous code from asynchronous
|
|
|
|
*
|
|
|
|
* Created on: Jul 3, 2019
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2019-07-03 18:01:48 -07:00
|
|
|
*/
|
|
|
|
|
2020-04-01 18:32:21 -07:00
|
|
|
#pragma once
|
2019-07-03 18:01:48 -07:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#include <ch.h>
|
|
|
|
#include <hal.h>
|
2019-07-03 18:48:04 -07:00
|
|
|
#include "chprintf.h"
|
2019-07-04 00:57:21 -07:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2019-07-03 18:48:04 -07:00
|
|
|
#include "io_pins.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Stack debugging
|
|
|
|
* See also getMaxUsedStack()
|
|
|
|
*/
|
2019-07-04 00:57:21 -07:00
|
|
|
EXTERNC int getRemainingStack(thread_t *otp);
|
2020-08-01 18:31:23 -07:00
|
|
|
int CountFreeStackSpace(const void* wabase);
|
2020-08-02 07:52:52 -07:00
|
|
|
void validateStack(const char*msg, obd_code_e code, int stackUnusedSize);
|
2019-07-03 18:01:48 -07:00
|
|
|
|
|
|
|
#define HAS_OS_ACCESS
|