Обновление
This commit is contained in:
parent
9d44036d29
commit
945b0b8fa9
|
|
@ -5,6 +5,7 @@
|
|||
#include "CanSpamReceiver.h"
|
||||
#include "CmsisRtosThreadUtils.h"
|
||||
#include "CanPorts.h"
|
||||
#include "string.h"
|
||||
|
||||
#define LOG_SIGN "CAN_RECEIVED"
|
||||
#define LOGGER env->logger
|
||||
|
|
@ -46,6 +47,15 @@ static void ListenCanSpamReceiver(tCanSpamReceiver *env) {
|
|||
|
||||
}
|
||||
|
||||
void get_CanSpamReceiver(tCanSpamReceiver *env) {
|
||||
if (osMutexAcquire(env->access, 1000) == osOK) {
|
||||
|
||||
osMutexRelease(env->access);
|
||||
} else {
|
||||
LoggerErrorStatic(LOGGER, LOG_SIGN, "Access error get_CanSpamReceiver");
|
||||
}
|
||||
}
|
||||
|
||||
static _Noreturn void CanSpamReceiver_Thread(tCanSpamReceiver *env) {
|
||||
for (;;) {
|
||||
ListenCanSpamReceiver(env);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "ccu_candb-binutil.h"
|
||||
#include "LoggerInterface.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
||||
tSerialPortFrameIO *ioCanFrame;
|
||||
|
|
@ -31,4 +32,6 @@ void CanSpamReceiver_Init(tCanSpamReceiver *env, tSerialPortFrameIO *ioCanFrame,
|
|||
|
||||
void CanSpamReceiver_StartThread(tCanSpamReceiver *env);
|
||||
|
||||
void get_CanSpamReceiver(tCanSpamReceiver *env);
|
||||
|
||||
#endif //HVAC_CAN_SPAM_RECEIVER_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue