forked from Beckhoff/BBAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_config.h
87 lines (75 loc) · 3.02 KB
/
test_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// SPDX-License-Identifier: MIT
/**
Beckhoff BIOS API driver to access hwmon sensors for Beckhoff IPCs
Copyright (C) 2014 - 2019 Beckhoff Automation GmbH & Co. KG
Author: Patrick Bruenn <[email protected]>
*/
#pragma once
/** test mode selection */
#define CONFIG_INTERACTIVE 1
/** reused ranges */
#define BOOTCOUNTER_RANGE 1, 15000
#define OPERATION_TIME_RANGE 1, 1500000
#define _24VOLT_RANGE 23500, 28000
#if defined(__i386__)
#define CONFIG_GENERAL_PLATFORM 0x00
#elif defined(__x86_64__)
#define CONFIG_GENERAL_PLATFORM 0x01
#endif
#define FILE_PATH "/dev/bbapi" // Path to character Device
/** select test device */
//#include "config_c6015.h"
//#include "config_cx5000.h"
//#include "config_cx5130.h"
//#include "config_cx2030_cx2100-0004.h"
//#include "config_cx2030_cx2100-0904.h"
/** PWRCTRL configuration */
#define CONFIG_PWRCTRL_OPERATION_TIME_RANGE OPERATION_TIME_RANGE
#define CONFIG_PWRCTRL_MIN_TEMP_RANGE 10, 20
#define CONFIG_PWRCTRL_MAX_TEMP_RANGE 70, 112
#define CONFIG_PWRCTRL_MIN_VOLT_RANGE 49, 50
#define CONFIG_PWRCTRL_MAX_VOLT_RANGE 49, 50
#define CONFIG_PWRCTRL_BOOT_COUNTER_RANGE BOOTCOUNTER_RANGE
#define CONFIG_PWRCTRL_POSITION 0x00
/** S-UPS configuration */
#ifndef CONFIG_SUPS_DISABLED
#define CONFIG_SUPS_STATUS_ON 0xC0
#define CONFIG_SUPS_REVISION {1, 9}
#define CONFIG_SUPS_POWERFAILCOUNT_RANGE BOOTCOUNTER_RANGE
#define CONFIG_SUPS_SHUTDOWN_TYPE 0xFF
#define CONFIG_SUPS_ACTIVE_COUNT 0
#define CONFIG_SUPS_INTERNAL_PWRF_STATUS 0
#define CONFIG_SUPS_TEST_RESULT 0
#define CONFIG_SUPS_GPIO_PIN {0x480, 0x28, 0x1}
#endif
/** CX Power Supply configuration */
#define CONFIG_CXPWRSUPP_BOOTCOUNTER_RANGE BOOTCOUNTER_RANGE
#define CONFIG_CXPWRSUPP_OPERATIONTIME_RANGE OPERATION_TIME_RANGE
#define CONFIG_CXPWRSUPP_5VOLT_RANGE 4900, 5100
#define CONFIG_CXPWRSUPP_12VOLT_RANGE 11900, 12500
#define CONFIG_CXPWRSUPP_24VOLT_RANGE _24VOLT_RANGE
#define CONFIG_CXPWRSUPP_TEMP_RANGE -35, 85
#define CONFIG_CXPWRSUPP_CURRENT_RANGE 600, 4550
#define CONFIG_CXPWRSUPP_POWER_RANGE 10000, 101000
#define CONFIG_CXPWRSUPP_BUTTON_STATE 0x00
/** CX UPS configuration */
#define CONFIG_CXUPS_ENABLED 0
#define CONFIG_CXUPS_FIRMWAREVER {1, 0}
#define CONFIG_CXUPS_POWERSTATUS 1 // (BYTE) (0 := Unknown, 1 := Online, 2 := OnBatteries)
#define CONFIG_CXUPS_BATTERYSTATUS 1 // (BYTE) (0 := Unknown, 1 := Ok, 2 := Change batteries)
#define CONFIG_CXUPS_BATTERYCAPACITY 100
#define CONFIG_CXUPS_BATTERYRUNTIME_RANGE 1, 6000
#define CONFIG_CXUPS_BOOTCOUNTER_RANGE 0, 1
#define CONFIG_CXUPS_OPERATIONTIME_RANGE OPERATION_TIME_RANGE
#define CONFIG_CXUPS_POWERFAILCOUNT 0
#define CONFIG_CXUPS_BATTERYCRITICAL 0
#define CONFIG_CXUPS_BATTERYPRESENT 1
#define CONFIG_CXUPS_OUTPUTVOLT_RANGE 9000, 12000
#define CONFIG_CXUPS_INPUTVOLT_RANGE _24VOLT_RANGE
#define CONFIG_CXUPS_CURRENT 0
#define CONFIG_CXUPS_CURRENT_RANGE 8000, 10000
#define CONFIG_CXUPS_POWER 0
#define CONFIG_CXUPS_POWER_RANGE 20000, 100000
#define CONFIG_CXUPS_TEMP_RANGE 0, 85
/** Watchdog configuration */
#define CONFIG_WATCHDOG_OPTIONS WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING