2020-11-29 19:01:24 +01:00
|
|
|
#ifndef _HW_VERSION_DETECT_H_
|
|
|
|
#define _HW_VERSION_DETECT_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-12-01 21:03:05 +01:00
|
|
|
/**
|
|
|
|
* @brief PCB/Hardware Revision Type
|
|
|
|
*/
|
2020-11-29 19:01:24 +01:00
|
|
|
enum hw_revision {
|
2020-12-01 21:03:05 +01:00
|
|
|
HW_REV_NOT_DETECTED = 0, /**< @brief The hardware has'nt been detected (yet) */
|
|
|
|
HW_REV_ERROR = 1, /**< @brief The hardware revision could not be detected due to an internal error */
|
|
|
|
HW_REV_V1_2 = 120, /**< @brief Hardware Revision v1.2 */
|
|
|
|
HW_REV_V1_3 = 130, /**< @brief Hardware Revision v1.3 */
|
2020-11-29 19:01:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @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_ */
|