Skip to content

Commit

Permalink
Fixed problem with MDF URL reading
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Sep 10, 2024
1 parent 3357288 commit 8312940
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions common/vscp-firmware-level2.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
/* Globals */

// Pointer to configuration data.
static vscp_frmw2_firmware_configt_t* g_pconfig;
static vscp_frmw2_firmware_config_t* g_pconfig;

///////////////////////////////////////////////////////////////////////////////
// vscp_frmw2_init
//

int
vscp_frmw2_init(vscp_frmw2_firmware_configt_t* const pcfg)
vscp_frmw2_init(vscp_frmw2_firmware_config_t* const pcfg)
{
int rv;

Expand Down Expand Up @@ -1344,7 +1344,7 @@ vscp_frmw2_read_reg(uint32_t reg, uint8_t* pval)
else if ((reg >= (VSCP_STD_REGISTER_GUID + ADJSTDREG)) && (reg < (VSCP_STD_REGISTER_GUID + ADJSTDREG + 16))) {
*pval = g_pconfig->m_guid[reg - VSCP_STD_REGISTER_GUID + ADJSTDREG];
}
else if ((reg >= (VSCP_STD_REGISTER_DEVICE_URL + ADJSTDREG)) && (reg < (VSCP_STD_REGISTER_DEVICE_URL + ADJSTDREG + 16))) {
else if ((reg >= (VSCP_STD_REGISTER_DEVICE_URL + ADJSTDREG)) && (reg < (VSCP_STD_REGISTER_DEVICE_URL + ADJSTDREG + 32))) {
*pval = g_pconfig->m_mdfurl[reg - VSCP_STD_REGISTER_DEVICE_URL + ADJSTDREG];
}
else {
Expand Down
14 changes: 7 additions & 7 deletions common/vscp-firmware-level2.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ typedef enum probe_substate_t {
Used internally
*/
typedef struct vscp_frmw2_firmware_configt_t {
typedef struct vscp_frmw2_firmware_config_t {
probe_state_t m_state; // State machine state
probe_substate_t m_substate; // state machine substate
uint32_t m_timer1; // Timer used for probe/config restore and other timing tasks
uint16_t nickname; // Nickname (init with persistent value)
//uint16_t m_nickname; // Nickname (init with persistent value)

// Level I nickname discovery
uint16_t m_probe_nickname; // 0-253
Expand Down Expand Up @@ -241,9 +241,9 @@ typedef struct vscp_frmw2_firmware_configt_t {

// Events of interest
const uint32_t* m_pEventsOfInterest; // List with events of interest or NULL
// if all events are of interest set to null.
// array = (int*) malloc(n * sizeof(int));
// Last event should be 0
// if all events are of interest set to null.
// array = (int*) malloc(n * sizeof(int));
// Last event should be 0

/*
This may be register positions on a device
Expand Down Expand Up @@ -309,7 +309,7 @@ typedef struct vscp_frmw2_firmware_configt_t {
uint8_t m_ipaddr[16]; // IP address (ipv4/ipv6)
uint8_t m_deviceName[64]; // Name of the device

} vscp_frmw2_firmware_configt_t;
} vscp_frmw2_firmware_config_t;

/*!
Used to adjust standard registers for Level I/ Level II
Expand Down Expand Up @@ -351,7 +351,7 @@ typedef struct vscp_frmw2_firmware_configt_t {
*/

int
vscp_frmw2_init(vscp_frmw2_firmware_configt_t* const pcfg);
vscp_frmw2_init(vscp_frmw2_firmware_config_t* const pcfg);

/*!
@brief Initialize persistent storage
Expand Down

0 comments on commit 8312940

Please sign in to comment.