read back of csr

This commit is contained in:
Erik Frojdh
2021-03-26 17:46:11 +01:00
parent a2007b78e7
commit 7c4f9ee044
12 changed files with 52 additions and 7 deletions

View File

@ -369,6 +369,7 @@ void function_table() {
flist[F_LOAD_DEFAULT_PATTERN] = &load_default_pattern;
flist[F_GET_ALL_THRESHOLD_ENERGY] = &get_all_threshold_energy;
flist[F_GET_MASTER] = &get_master;
flist[F_GET_CSR] = &get_csr;
// check
if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) {
@ -8388,3 +8389,19 @@ int get_master(int file_des){
#endif
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
}
int get_csr(int file_des){
ret = OK;
memset(mess, 0, sizeof(mess));
int retval = -1;
LOG(logDEBUG1, ("Getting csr\n"));
#ifndef MYTHEN3D
functionNotImplemented();
#else
retval = getChipStatusRegister();
#endif
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
}