Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT Monitoring Module
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
DIOT Monitoring Module
Commits
b8df1aa9
Commit
b8df1aa9
authored
Dec 08, 2021
by
Christos Gentsos
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: make FAN_CONFIG_x_y commands also readable (return the config)
They were
parent
064b5e49
Pipeline
#2956
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
i2c_impl.c
main_fw/src/i2c_impl.c
+10
-2
No files found.
main_fw/src/i2c_impl.c
View file @
b8df1aa9
...
@@ -92,6 +92,7 @@ extern uint16_t temp_control_on __xMR;
...
@@ -92,6 +92,7 @@ extern uint16_t temp_control_on __xMR;
uint8_t
fan_config_1_2
;
uint8_t
fan_config_1_2
;
uint8_t
fan_config_3_4
;
uint8_t
fan_config_3_4
;
void
fan_config
();
void
fan_config
();
void
get_fan_configs
();
extern
uint16_t
fan_installed
[
3
]
__xMR
;
extern
uint16_t
fan_installed
[
3
]
__xMR
;
extern
uint16_t
fan_cmdrpm
[
3
]
__xMR
;
extern
uint16_t
fan_cmdrpm
[
3
]
__xMR
;
extern
uint16_t
fan_ppr
[
3
]
__xMR
;
extern
uint16_t
fan_ppr
[
3
]
__xMR
;
...
@@ -160,10 +161,10 @@ static const cmd_t cmds_cmds[] = (cmd_t[]){
...
@@ -160,10 +161,10 @@ static const cmd_t cmds_cmds[] = (cmd_t[]){
{
0x009C
,
(
int8_t
*
)
&
cmd_data_lengths
[
17
],
(
uint8_t
*
)
&
MFR_LOC
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
QUERY_RD
|
QUERY_FMT_NAN
,
0
},
{
0x009C
,
(
int8_t
*
)
&
cmd_data_lengths
[
17
],
(
uint8_t
*
)
&
MFR_LOC
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
QUERY_RD
|
QUERY_FMT_NAN
,
0
},
{
0x009D
,
(
int8_t
*
)
&
cmd_data_lengths
[
18
],
(
uint8_t
*
)
&
MFR_DAT
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
QUERY_RD
|
QUERY_FMT_NAN
,
0
},
{
0x009D
,
(
int8_t
*
)
&
cmd_data_lengths
[
18
],
(
uint8_t
*
)
&
MFR_DAT
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
QUERY_RD
|
QUERY_FMT_NAN
,
0
},
{
0x009E
,
(
int8_t
*
)
&
cmd_data_lengths
[
19
],
(
uint8_t
*
)
&
MFR_SER
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
QUERY_RD
|
QUERY_FMT_NAN
,
0
},
{
0x009E
,
(
int8_t
*
)
&
cmd_data_lengths
[
19
],
(
uint8_t
*
)
&
MFR_SER
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
(
fp_t
)
NULL
,
QUERY_RD
|
QUERY_FMT_NAN
,
0
},
{
0x003A
,
(
int8_t
*
)
&
cmd_data_lengths
[
20
],
(
uint8_t
*
)
&
fan_config_1_2
,
(
fp_t
)
NULL
,
&
fan_config
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_NAN
,
0
},
{
0x003A
,
(
int8_t
*
)
&
cmd_data_lengths
[
20
],
(
uint8_t
*
)
&
fan_config_1_2
,
&
get_fan_configs
,
&
fan_config
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_NAN
,
0
},
{
0x003B
,
(
int8_t
*
)
&
cmd_data_lengths
[
21
],
(
uint8_t
*
)
&
setfrpms_lin
[
0
],
(
fp_t
)
NULL
,
&
set_frpms
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_LIN
,
0
},
{
0x003B
,
(
int8_t
*
)
&
cmd_data_lengths
[
21
],
(
uint8_t
*
)
&
setfrpms_lin
[
0
],
(
fp_t
)
NULL
,
&
set_frpms
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_LIN
,
0
},
{
0x003C
,
(
int8_t
*
)
&
cmd_data_lengths
[
22
],
(
uint8_t
*
)
&
setfrpms_lin
[
1
],
(
fp_t
)
NULL
,
&
set_frpms
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_LIN
,
0
},
{
0x003C
,
(
int8_t
*
)
&
cmd_data_lengths
[
22
],
(
uint8_t
*
)
&
setfrpms_lin
[
1
],
(
fp_t
)
NULL
,
&
set_frpms
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_LIN
,
0
},
{
0x003D
,
(
int8_t
*
)
&
cmd_data_lengths
[
23
],
(
uint8_t
*
)
&
fan_config_3_4
,
(
fp_t
)
NULL
,
&
fan_config
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_NAN
,
0
},
{
0x003D
,
(
int8_t
*
)
&
cmd_data_lengths
[
23
],
(
uint8_t
*
)
&
fan_config_3_4
,
&
get_fan_configs
,
&
fan_config
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_NAN
,
0
},
{
0x003E
,
(
int8_t
*
)
&
cmd_data_lengths
[
24
],
(
uint8_t
*
)
&
setfrpms_lin
[
2
],
(
fp_t
)
NULL
,
&
set_frpms
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_LIN
,
0
},
{
0x003E
,
(
int8_t
*
)
&
cmd_data_lengths
[
24
],
(
uint8_t
*
)
&
setfrpms_lin
[
2
],
(
fp_t
)
NULL
,
&
set_frpms
,
(
fp_t
)
NULL
,
QUERY_WR
|
QUERY_FMT_LIN
,
0
},
{
0xFF05
,
(
int8_t
*
)
&
ext_cmd_data_lengths
[
0
],
(
uint8_t
*
)
&
dummy_byte
,
(
fp_t
)
NULL
,
&
boot_new_fw
,
(
fp_t
)
NULL
,
0
,
0
},
{
0xFF05
,
(
int8_t
*
)
&
ext_cmd_data_lengths
[
0
],
(
uint8_t
*
)
&
dummy_byte
,
(
fp_t
)
NULL
,
&
boot_new_fw
,
(
fp_t
)
NULL
,
0
,
0
},
{
0xFF06
,
(
int8_t
*
)
&
ext_cmd_data_lengths
[
1
],
(
uint8_t
*
)
&
dummy_byte
,
(
fp_t
)
NULL
,
&
uc_reset
,
(
fp_t
)
NULL
,
0
,
0
},
{
0xFF06
,
(
int8_t
*
)
&
ext_cmd_data_lengths
[
1
],
(
uint8_t
*
)
&
dummy_byte
,
(
fp_t
)
NULL
,
&
uc_reset
,
(
fp_t
)
NULL
,
0
,
0
},
...
@@ -298,6 +299,13 @@ void __xMR fan_config()
...
@@ -298,6 +299,13 @@ void __xMR fan_config()
flash_write_row
((
uint32_t
*
)
&
user_flash
,
(
uint32_t
*
)
fw_write_buf
);
flash_write_row
((
uint32_t
*
)
&
user_flash
,
(
uint32_t
*
)
fw_write_buf
);
}
}
void
__xMR
get_fan_configs
()
{
fan_config_1_2
=
(
fan_installed
[
0
]
<<
7
)
|
(
fan_cmdrpm
[
0
]
<<
6
)
|
(
fan_ppr
[
0
]
<<
4
)
|
(
fan_installed
[
1
]
<<
3
)
|
(
fan_cmdrpm
[
1
]
<<
2
)
|
(
fan_ppr
[
1
]);
fan_config_3_4
=
(
fan_installed
[
2
]
<<
7
)
|
(
fan_cmdrpm
[
2
]
<<
6
)
|
(
fan_ppr
[
2
]
<<
4
);
}
void
__xMR
set_frpms
()
void
__xMR
set_frpms
()
{
{
...
...
Christos Gentsos
@cgentsos
mentioned in issue
#4 (closed)
·
Dec 08, 2021
mentioned in issue
#4 (closed)
mentioned in issue #4
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment