Commit 1c67958d authored by Bernd-Christian Renner's avatar Bernd-Christian Renner
Browse files

renamed 'spreadcode' to 'bitspread'

parent c0fa5e0a
......@@ -47,7 +47,7 @@
#include "csrc/aci_bootloader.c"
#include "csrc/aci_reset.c"
#include "csrc/aci_rxthresh.c"
#include "csrc/aci_spreadcode.c"
#include "csrc/aci_bitspread.c"
#include "csrc/aci_filterraw.c"
#include "csrc/aci_synclen.c"
#include "csrc/aci_agc.c"
......@@ -93,7 +93,7 @@ cmdTbl[ACI_TYPE_BATVOLTAGE-PACKET_TYPE_CMD_OFFSET] = aci_batvoltage_processCmd;
cmdTbl[ACI_TYPE_BOOTLOADER-PACKET_TYPE_CMD_OFFSET] = aci_bootloader_processCmd;
cmdTbl[ACI_TYPE_RESET-PACKET_TYPE_CMD_OFFSET] = aci_reset_processCmd;
cmdTbl[ACI_TYPE_RXTHRESH-PACKET_TYPE_CMD_OFFSET] = aci_rxthresh_processCmd;
cmdTbl[ACI_TYPE_SPREADCODE-PACKET_TYPE_CMD_OFFSET] = aci_spreadcode_processCmd;
cmdTbl[ACI_TYPE_BITSPREAD-PACKET_TYPE_CMD_OFFSET] = aci_bitspread_processCmd;
cmdTbl[ACI_TYPE_FILTERRAW-PACKET_TYPE_CMD_OFFSET] = aci_filterraw_processCmd;
cmdTbl[ACI_TYPE_SYNCLEN-PACKET_TYPE_CMD_OFFSET] = aci_synclen_processCmd;
cmdTbl[ACI_TYPE_AGC-PACKET_TYPE_CMD_OFFSET] = aci_agc_processCmd;
......@@ -127,7 +127,7 @@ rspTbl[ACI_TYPE_BATVOLTAGE-PACKET_TYPE_CMD_OFFSET] = aci_batvoltage_fillReply;
rspTbl[ACI_TYPE_BOOTLOADER-PACKET_TYPE_CMD_OFFSET] = aci_bootloader_fillReply;
rspTbl[ACI_TYPE_RESET-PACKET_TYPE_CMD_OFFSET] = aci_reset_fillReply;
rspTbl[ACI_TYPE_RXTHRESH-PACKET_TYPE_CMD_OFFSET] = aci_rxthresh_fillReply;
rspTbl[ACI_TYPE_SPREADCODE-PACKET_TYPE_CMD_OFFSET] = aci_spreadcode_fillReply;
rspTbl[ACI_TYPE_BITSPREAD-PACKET_TYPE_CMD_OFFSET] = aci_bitspread_fillReply;
rspTbl[ACI_TYPE_FILTERRAW-PACKET_TYPE_CMD_OFFSET] = aci_filterraw_fillReply;
rspTbl[ACI_TYPE_SYNCLEN-PACKET_TYPE_CMD_OFFSET] = aci_synclen_fillReply;
rspTbl[ACI_TYPE_AGC-PACKET_TYPE_CMD_OFFSET] = aci_agc_fillReply;
......
......@@ -47,7 +47,7 @@ ACI_TYPE_BATVOLTAGE = 0x85,
ACI_TYPE_BOOTLOADER = 0x86,
ACI_TYPE_RESET = 0x87,
ACI_TYPE_RXTHRESH = 0x94,
ACI_TYPE_SPREADCODE = 0x95,
ACI_TYPE_BITSPREAD = 0x95,
ACI_TYPE_FILTERRAW = 0x96,
ACI_TYPE_SYNCLEN = 0x97,
ACI_TYPE_AGC = 0x98,
......
......@@ -12,7 +12,7 @@ RESET = 0x87 // reset modem
// FREQSETUP_NUMCARRIERS = 0x92 // setup carriers / hopping sequence
// FREQSETUP_CARRIERS = 0x93 // setup carriers / hopping sequence
RXTHRESH = 0x94 // setup rx threshold
SPREADCODE = 0x95 // setup spread code length
BITSPREAD = 0x95 // setup spread code length
FILTERRAW = 0x96 // setup filter stages (raw value)
SYNCLEN = 0x97 // setup preamble/sync len
AGC = 0x98 // enable / disable AGC
......
/**
* Copyright 2016-2019
* Copyright 2016-2020
*
* Bernd-Christian Renner, and
* Hamburg University of Technology (TUHH).
......@@ -34,8 +34,8 @@
*/
#include "aci.h"
#include "aci/types/spreadcode_cmd.h"
#include "aci_spreadcode.h"
#include "aci/types/bitspread_cmd.h"
#include "aci_bitspread.h"
#include <spreader.h>
......@@ -51,14 +51,14 @@
*/
uint8_t
aci_spreadcode_fillReply(uint8_t * payload)
aci_bitspread_fillReply(uint8_t * payload)
{
aci_spreadcode_cmd_t * p = (aci_spreadcode_cmd_t *)payload;
aci_bitspread_cmd_t * p = (aci_bitspread_cmd_t *)payload;
// payload
p->codelen = spreader_getSpreadLength();
p->chips = spreader_getSpreadLength();
return sizeof(aci_spreadcode_cmd_t);
return sizeof(aci_bitspread_cmd_t);
}
......@@ -68,10 +68,10 @@ aci_spreadcode_fillReply(uint8_t * payload)
*/
void
aci_spreadcode_processCmd(const mm_packet_t * pkt)
aci_bitspread_processCmd(const mm_packet_t * pkt)
{
if (pkt->header.len == sizeof(aci_spreadcode_cmd_t)) {
spreader_setSpreadLength(((aci_spreadcode_cmd_t *)pkt->payload)->codelen);
if (pkt->header.len == sizeof(aci_bitspread_cmd_t)) {
spreader_setSpreadLength(((aci_bitspread_cmd_t *)pkt->payload)->chips);
}
}
......
/**
* Copyright 2016-2018
* Copyright 2016-2020
*
* Bernd-Christian Renner, and
* Hamburg University of Technology (TUHH).
......@@ -34,8 +34,8 @@
*/
#ifndef ACI_SPREADCODE_H
#define ACI_SPREADCODE_H
#ifndef ACI_BITSPREAD_H
#define ACI_BITSPREAD_H
#include "types.h"
......@@ -44,11 +44,11 @@
* change spread code /chipping
*/
extern void
aci_spreadcode_processCmd(const mm_packet_t * pkt);
aci_bitspread_processCmd(const mm_packet_t * pkt);
extern uint8_t
aci_spreadcode_fillReply(uint8_t * payload);
aci_bitspread_fillReply(uint8_t * payload);
#endif /* ACI_SPREADCODE_H */
#endif /* ACI_BITSPREAD_H */
typedef struct __attribute__ ((__packed__)) {
uint8_t codelen; // code length (1, ..., max code len)
} aci_spreadcode_cmd_t;
uint8_t chips; // code length (1, ..., max code len)
} aci_bitspread_cmd_t;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment