style: use east const in the C API header
Convert the remaining west-const declarations in xone_api.h to east const so the whole file matches the controller functions added later. Update the AGENTS.md C bridge section: east const applies to the C header too; only trailing returns are exempt. Co-Authored-By: qwen3.8-27b@q3_k_xl: converted C API header to east const
This commit is contained in:
@@ -15,7 +15,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// Human-readable version string of the protocol stack.
|
||||
const char *xone_version(void);
|
||||
char const *xone_version(void);
|
||||
|
||||
// TRUE if an Xbox Wireless Dongle is connected, FALSE otherwise.
|
||||
bool xone_dongle_present(void);
|
||||
@@ -41,29 +41,29 @@ xone_dongle *xone_open(void);
|
||||
// returns 0 once started, -1 if the session is busy or already ready. If
|
||||
// firmware_path is NULL, the common upstream image
|
||||
// (firmware/xow_dongle.bin) is used.
|
||||
int xone_start(xone_dongle *d, const char *firmware_path);
|
||||
int xone_start(xone_dongle *d, char const *firmware_path);
|
||||
|
||||
// Close the session and release the dongle. Waits for any in-progress start.
|
||||
void xone_close(xone_dongle *d);
|
||||
|
||||
// Current session state (XONE_STATE_*).
|
||||
int xone_state(const xone_dongle *d);
|
||||
int xone_state(xone_dongle const *d);
|
||||
|
||||
// Human-readable error from the last failed operation. Empty string if none.
|
||||
const char *xone_error(const xone_dongle *d);
|
||||
char const *xone_error(xone_dongle const *d);
|
||||
|
||||
// Product ID of the connected dongle (e.g. 0x02E6).
|
||||
uint16_t xone_pid(const xone_dongle *d);
|
||||
uint16_t xone_pid(xone_dongle const *d);
|
||||
|
||||
// Chip ID from EFUSE (e.g. 0x7612 for MT7612). 0 if unknown.
|
||||
uint16_t xone_chip_id(const xone_dongle *d);
|
||||
uint16_t xone_chip_id(xone_dongle const *d);
|
||||
|
||||
// MAC address from EFUSE as "xx:xx:xx:xx:xx:xx". Valid until xone_close().
|
||||
const char *xone_mac_address(const xone_dongle *d);
|
||||
char const *xone_mac_address(xone_dongle const *d);
|
||||
|
||||
// Build string of the loaded firmware image (e.g. "201703281033____").
|
||||
// Empty string if the firmware was not loaded. Valid until xone_close().
|
||||
const char *xone_firmware_build(const xone_dongle *d);
|
||||
char const *xone_firmware_build(xone_dongle const *d);
|
||||
|
||||
// Number of connected controllers.
|
||||
int xone_controller_count(xone_dongle const *d);
|
||||
|
||||
Reference in New Issue
Block a user