passing parameter issue
May 27, 2016 at 4:17am UTC
I have defined a variable as follows:
I have a header file that has a subprogram defined as
1 2 3 4
enum status_code eeprom_emulator_write_buffer(
const uint16_t offset,
const uint8_t *const data,
const uint16_t length);
I tried many ways to call the subprogram n pass the variable to it but I get error.
how can I call this subprogram using my variable ?
Last edited on May 27, 2016 at 4:17am UTC
May 27, 2016 at 4:40am UTC
I imagine the last two parameters should be (const uint8_t *)ssid, 10
. I don't know what the function might expect as an 'offset', though.
May 27, 2016 at 5:06am UTC
thanks that worked ...
now I have a function that reads from the offset location the value into a variable .
how can I call the following function to populate the ssid variable ?
1 2 3 4
enum status_code eeprom_emulator_read_buffer(
const uint16_t offset,
uint8_t *const data,
const uint16_t length);
Last edited on May 27, 2016 at 5:06am UTC
May 27, 2016 at 5:52am UTC
Same as above, without the const modifier.
Topic archived. No new replies allowed.