32 lines
764 B
C
32 lines
764 B
C
|
#ifndef _HW_VERSION_DETECT_H_
|
||
|
#define _HW_VERSION_DETECT_H_
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
enum hw_revision {
|
||
|
HW_REV_NOT_DETECTED = 0,
|
||
|
HW_REV_ERROR = 1,
|
||
|
HW_REV_V1_2 = 120,
|
||
|
HW_REV_V1_3 = 130,
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @brief This function returns the hardware version of the PCB.
|
||
|
*
|
||
|
* This is used to
|
||
|
* determine the feature set of the hardware. So this firmware can be used on all hardwares.
|
||
|
*
|
||
|
* The first hardware revision supported, is: v1.2
|
||
|
*
|
||
|
* The function returns the HW revision as an enum hw_revision.
|
||
|
* For v1.2 the return value is 120 (HW_REV_V1_2).
|
||
|
* For v1.3 the return value is 130 (HW_REV_V1_3).
|
||
|
*
|
||
|
* Other return values are not defined yet.
|
||
|
*
|
||
|
* @return Harware revision
|
||
|
*/
|
||
|
enum hw_revision get_pcb_hardware_version(void);
|
||
|
|
||
|
#endif /* _HW_VERSION_DETECT_H_ */
|