usb: make strings "const char * const *"
This allows the pointer table to be in Flash, by using
"static const char * const strings[] = { ... };"
See https://github.com/libopencm3/libopencm3/pull/924
This commit is contained in:
committed by
Karl Palsson
parent
fa7a908027
commit
343cff4675
@@ -42,7 +42,7 @@ LGPL License Terms @ref lgpl_license
|
||||
usbd_device *usbd_init(const usbd_driver *driver,
|
||||
const struct usb_device_descriptor *dev,
|
||||
const struct usb_config_descriptor *conf,
|
||||
const char **strings, int num_strings,
|
||||
const char * const *strings, int num_strings,
|
||||
uint8_t *control_buffer, uint16_t control_buffer_size)
|
||||
{
|
||||
usbd_device *usbd_dev;
|
||||
|
||||
@@ -47,7 +47,7 @@ LGPL License Terms @ref lgpl_license
|
||||
struct _usbd_device {
|
||||
const struct usb_device_descriptor *desc;
|
||||
const struct usb_config_descriptor *config;
|
||||
const char **strings;
|
||||
const char * const *strings;
|
||||
int num_strings;
|
||||
|
||||
uint8_t *ctrl_buf; /**< Internal buffer used for control transfers */
|
||||
|
||||
Reference in New Issue
Block a user