Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • e-24/public/ahoi/firmware
1 result
Show changes
Showing
with 38 additions and 23 deletions
......@@ -69,10 +69,12 @@ aci_id_fillReply(uint8_t * payload)
* public functions
*/
void
bool
aci_id_processCmd(const mm_packet_t * pkt)
{
// optional action, always return current state
if (pkt->header.len == sizeof(aci_id_cmd_t)) {
id_setId(((aci_id_cmd_t *)(pkt->payload))->id);
}
return true;
}
......@@ -44,7 +44,7 @@
/**
* get or set modem id
*/
extern void
extern bool
aci_id_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -86,7 +86,9 @@ aci_packetstat_fillReply(uint8_t * payload)
* public functions
*/
extern void
bool
aci_packetstat_processCmd(__attribute__ ((unused)) const mm_packet_t * pkt)
{
// read-only
return true;
}
......@@ -45,7 +45,7 @@
/**
* get packet statistics
*/
extern void
extern bool
aci_packetstat_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -61,10 +61,11 @@
* public functions
*/
void
bool
aci_packetstat_reset_processCmd(__attribute__ ((unused)) const mm_packet_t * pkt)
{
aci_packetstat_clear();
return true;
}
......
......@@ -44,7 +44,7 @@
/**
* get packet statistics
*/
extern void
extern bool
aci_packetstat_reset_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -68,13 +68,15 @@ aci_peakwinlen_fillReply(uint8_t * payload)
* public functions
*/
void
bool
aci_peakwinlen_processCmd(const mm_packet_t * pkt)
{
// optional action, always return current state
if (pkt->header.len == sizeof(aci_peakwinlen_cmd_t)) {
aci_peakwinlen_cmd_t * p = (aci_peakwinlen_cmd_t *)(pkt->payload);
freq_setSignalWindowSize(US_TO_RXCNT( NTOHS(p->winlen) ));
}
return true;
}
......
......@@ -43,7 +43,7 @@
/**
* configure length of peak detection window
*/
extern void
extern bool
aci_peakwinlen_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -65,13 +65,15 @@ aci_pktpin_fillReply(uint8_t * payload)
* public functions
*/
void
bool
aci_pktpin_processCmd(const mm_packet_t * pkt)
{
// optional action, always return current state
if (pkt->header.len == sizeof(aci_pktpin_cmd_t)) {
aci_pktpin_cmd_t * p = (aci_pktpin_cmd_t *)(pkt->payload);
pktpin_setMode(p->mode);
}
return true;
}
......
......@@ -43,7 +43,7 @@
/**
* configure packet pin mode
*/
extern void
extern bool
aci_pktpin_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -82,12 +82,11 @@ aci_powerlevel_fillReply(uint8_t * payload)
* public functions
*/
void
bool
aci_powerlevel_processCmd(const mm_packet_t * pkt)
{
if (pkt->header.len != 0) {
return;
}
// read-only command
return true;
}
......
......@@ -44,7 +44,7 @@
/**
* get power level value
*/
extern void
extern bool
aci_powerlevel_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -67,12 +67,14 @@ aci_rangingdelay_fillReply(uint8_t * payload)
* public functions
*/
void
bool
aci_rangingdelay_processCmd(const mm_packet_t * pkt)
{
// optional action, always return current state
if (pkt->header.len == sizeof(aci_rangingdelay_cmd_t)) {
ranging_setDelayTicks(MS_TO_TICKS(NTOHL(((aci_rangingdelay_cmd_t *)pkt->payload)->rangingdelay)));
}
return true;
}
......
......@@ -43,7 +43,7 @@
/**
* change ranging delay
*/
extern void
extern bool
aci_rangingdelay_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -62,10 +62,11 @@ aci_reset_fillReply(__attribute__ ((unused)) uint8_t * payload)
* public functions
*/
void
bool
aci_reset_processCmd(__attribute__ ((unused)) const mm_packet_t * pkt)
{
// FIXME no reply, board will die before ...
board_resetMCU();
return false;
}
......@@ -43,7 +43,7 @@
/**
* reset modem
*/
extern void
extern bool
aci_reset_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -68,13 +68,15 @@ aci_rxgain_fillReply(uint8_t * payload)
* public functions
*/
void
bool
aci_rxgain_processCmd(const mm_packet_t * pkt)
{
// optional action, always return current state
if (pkt->header.len == sizeof(aci_rxgain_cmd_t)) {
aci_rxgain_cmd_t * p = (aci_rxgain_cmd_t *)(pkt->payload);
filterio_setGainLevel(p->level);
}
return true;
}
......
......@@ -43,7 +43,7 @@
/**
* configure rx gain level
*/
extern void
extern bool
aci_rxgain_processCmd(const mm_packet_t * pkt);
extern uint8_t
......
......@@ -73,13 +73,15 @@ aci_rxgainraw_fillReply(uint8_t * payload)
* public functions
*/
void
bool
aci_rxgainraw_processCmd(const mm_packet_t * pkt)
{
// optional action, always return current state
if (pkt->header.len == sizeof(aci_rxgainraw_cmd_t)) {
aci_rxgainraw_cmd_t * p = (aci_rxgainraw_cmd_t *)(pkt->payload);
filterio_setValue(p->stage, p->level);
}
return true;
}
......
......@@ -43,7 +43,7 @@
/**
* configure rx gain level (by stage and level)
*/
extern void
extern bool
aci_rxgainraw_processCmd(const mm_packet_t * pkt);
extern uint8_t
......