#ifndef FUNC_LIB_H
#define FUNC_LIB_H

#ifdef __cplusplus
extern "C" {
#endif


#if defined(SPC1158)
#include "spc1158.h"
#elif defined(SPD1148)
#include "spd1148.h"
#elif defined(SPD1178)
#include "spd1178.h"
#elif defined(SPD1188)
#include "spd1188.h"
#elif defined(SPD1163)
#include "spd1163.h"
#else
#include "spc1168.h"
#endif

typedef struct PHB
{
  uint32_t voltage;
  uint16_t phase;
}PHBs;


typedef struct
{
    uint32_t (*pUserFunc)(uint8_t a, uint8_t b, int vtor, int* c, int d);
    PHBs* (*pGetMotorStatus)(uint32_t *PHA, PHBs * PHB, int *PHC, uint32_t **Key, uint32_t Count);
    uint32_t (*ptestfunc)(void);
}FUNCLIB;


uint32_t testfunc(void);
uint32_t    UserFunc(uint8_t a, uint8_t b, int vtor, int* c, int d);
PHBs* GetMotorStatus(uint32_t *PHA, PHBs * PHB, int *PHC, uint32_t **Key, uint32_t Count);

#ifdef __cplusplus
}
#endif /* extern "C" */

#endif /* FUNC_LIB_H */

/******************* Copyright (C) 2022 Spintrol Electronic Technology (Shanghai) Co., Ltd. ***** END OF FILE ****/
