Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
firmware
Commits
2926c3da
Commit
2926c3da
authored
Apr 02, 2021
by
Rahix
Browse files
docs(epicardium): Fixup a bunch of minor docs issues
parent
5a2b897b
Changes
1
Hide whitespace changes
Inline
Side-by-side
epicardium/epicardium.h
View file @
2926c3da
...
...
@@ -1814,6 +1814,12 @@ API(API_DISP_FRAMEBUFFER, int epic_disp_framebuffer(
));
/**
* Light Sensor
* ============
*/
/**
* Set the backlight brightness.
*
...
...
@@ -1827,12 +1833,12 @@ API(API_DISP_BACKLIGHT, int epic_disp_backlight(uint16_t brightness));
/**
* Start continuous readout of the light sensor. Will read light level
* at preconfigured interval and make it available via `epic_light_sensor_get
()
`.
* at preconfigured interval and make it available via
:c:func:
`epic_light_sensor_get`.
*
* If the continuous readout was already running, this function will silently pass.
*
*
* :return: `
0
` if the start was successful or a negative error value
* :return: `
`0`
` if the start was successful or a negative error value
* if an error occured. Possible errors:
*
* - ``-EBUSY``: The timer could not be scheduled.
...
...
@@ -1843,7 +1849,7 @@ API(API_LIGHT_SENSOR_RUN, int epic_light_sensor_run());
* Get the last light level measured by the continuous readout.
*
* :param uint16_t* value: where the last light level should be written.
* :return: `
0
` if the readout was successful or a negative error
* :return: `
`0`
` if the readout was successful or a negative error
* value. Possible errors:
*
* - ``-ENODATA``: Continuous readout not currently running.
...
...
@@ -1856,7 +1862,7 @@ API(API_LIGHT_SENSOR_GET, int epic_light_sensor_get(uint16_t* value));
*
* If the continuous readout wasn't running, this function will silently pass.
*
* :return: `
0
` if the stop was sucessful or a negative error value
* :return: `
`0`
` if the stop was sucessful or a negative error value
* if an error occured. Possible errors:
*
* - ``-EBUSY``: The timer stop could not be scheduled.
...
...
@@ -2110,7 +2116,7 @@ API(API_RTC_SET_MILLISECONDS, void epic_rtc_set_milliseconds(
* Schedule the RTC alarm for the given timestamp.
*
* :param uint32_t timestamp: When to schedule the IRQ
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-EINVAL``: RTC is in a bad state
...
...
@@ -2148,7 +2154,7 @@ API_ISR(EPIC_INT_RTC_ALARM, epic_isr_rtc_alarm);
*
* :param uint8_t * dest: Destination buffer
* :param size: Number of bytes to read.
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-EFAULT``: Invalid destination address.
...
...
@@ -2162,7 +2168,7 @@ API(API_TRNG_READ, int epic_trng_read(uint8_t *dest, size_t size));
*
* :param uint8_t * dest: Destination buffer
* :param size: Number of bytes to read.
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-EFAULT``: Invalid destination address.
...
...
@@ -2290,7 +2296,7 @@ API(API_WS2812_WRITE, void epic_ws2812_write(uint8_t pin, uint8_t *pixels, uint3
*
* :param char* key: Name of the option to read
* :param int* value: Place to read the value into
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-ENOENT``: Value can not be read
...
...
@@ -2304,7 +2310,7 @@ API(API_CONFIG_GET_INTEGER, int epic_config_get_integer(const char *key, int *va
*
* :param char* key: Name of the option to read
* :param bool* value: Place to read the value into
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-ENOENT``: Value can not be read
...
...
@@ -2317,13 +2323,13 @@ API(API_CONFIG_GET_BOOLEAN, int epic_config_get_boolean(const char *key, bool *v
* Read a string from the configuration file.
*
* If the buffer supplied is too small for the config option,
* no error is reported and the first `buf_len - 1` characters
* no error is reported and the first
`
`buf_len - 1`
`
characters
* are returned (0 terminated).
*
* :param char* key: Name of the option to read
* :param char* buf: Place to read the string into
* :param size_t buf_len: Size of the provided buffer
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-ENOENT``: Value can not be read
...
...
@@ -2338,7 +2344,7 @@ API(API_CONFIG_GET_STRING, int epic_config_get_string(const char *key, char *buf
*
* :param char* key: Name of the option to write
* :param char* value: The value to write
* :return: `
0
` on success or a negative value if an error occured. Possivle
* :return: `
`0`
` on success or a negative value if an error occured. Possivle
* errors:
*
* - ``-EINVAL``: Parameters out of range
...
...
@@ -2556,7 +2562,7 @@ API(API_BLE_GET_COMPARE_VALUE, uint32_t epic_ble_get_compare_value(void));
/**
* Retrieve the (file) name of the last pairing which was successful.
*
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-ENOENT``: There was no successful pairing yet.
...
...
@@ -2571,7 +2577,7 @@ API(API_BLE_GET_LAST_PAIRING_NAME, int epic_ble_get_last_pairing_name(char *buf,
* The name might be empty if the peer device does not expose it or
* if it has not yet been read from it.
*
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-ENOENT``: There is no active connection at the moment.
...
...
@@ -2588,7 +2594,7 @@ API(API_BLE_GET_PEER_DEVICE_NAME, int epic_ble_get_peer_device_name(char *buf, s
* proceed and complete the pairing process. If called with ``false``, the
* pairing procedure will be aborted.
*
* :param bool confirmed: `true` if the user confirmed the compare value.
* :param bool confirmed:
`
`true`
`
if the user confirmed the compare value.
*
* .. versionadded:: 1.16
*/
...
...
@@ -2615,8 +2621,8 @@ API(API_BLE_COMPARE_RESPONSE, void epic_ble_compare_response(bool confirmed));
* When switching applications new bondings are automatically
* disallowed and scanning is stopped.
*
* :param bool bondable: `true` if new bondings should be allowed.
* :param bool scanner: `true` if scanning should be turned on.
* :param bool bondable:
`
`true`
`
if new bondings should be allowed.
* :param bool scanner:
`
`true`
`
if scanning should be turned on.
*
* .. versionadded:: 1.16
*/
...
...
@@ -2627,7 +2633,7 @@ API(API_BLE_SET_MODE, void epic_ble_set_mode(bool bondable, bool scanner));
*
* :param struct epic_scan_report* rpt: Pointer where the report will be stored.
*
* :return: `
0
` on success or a negative value if an error occured. Possible
* :return: `
`0`
` on success or a negative value if an error occured. Possible
* errors:
*
* - ``-ENOENT``: No scan report available
...
...
@@ -2642,8 +2648,8 @@ API(API_BLE_GET_SCAN_REPORT, int epic_ble_get_scan_report(struct epic_scan_repor
* :param uint8_t *data: Data to be reported.
* :param uint8_t len: Length in bytes of the data to be reported. Maximum length is 8 bytes.
*
* :return: `
0
` on success, `
1
` if the report is queued or a negative value
if an error occured. Possible
* errors:
* :return: `
`0`
` on success, `
`1`
` if the report is queued or a negative value
*
if an error occured. Possible
errors:
*
* - ``-EIO``: There is no host device connected or BLE HID is not enabled.
* - ``-EAGAIN``: There is no space in the queue available. Try again later.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment