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