passing parameter issue

I have defined a variable as follows:
 
char ssid[10]


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
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.
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
Same as above, without the const modifier.
Topic archived. No new replies allowed.