Verified Commit 644b6327 authored by Rahix's avatar Rahix
Browse files

docs: Tag all new things as 1.10


Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 3565627b
...@@ -201,6 +201,8 @@ Struct module. ...@@ -201,6 +201,8 @@ Struct module.
UUID(bytes='\x12\x34\x56\x78' * 4) UUID(bytes='\x12\x34\x56\x78' * 4)
UUID(int=0x12345678123456781234567812345678) UUID(int=0x12345678123456781234567812345678)
.. versionadded:: 1.10
.. py:attribute:: bytes .. py:attribute:: bytes
UUID as ``bytes()`` object UUID as ``bytes()`` object
...@@ -221,7 +223,4 @@ Struct module. ...@@ -221,7 +223,4 @@ Struct module.
Generate a new UUID version 4 (random UUID). Generate a new UUID version 4 (random UUID).
.. todo:: .. versionadded:: 1.10
This function is not yet usable because we don't have
:py:func:`os.urandom` yet.
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
========================== ==========================
The ``ws2812`` module controls LEDs of the WS2812 type. Just as the ``leds`` module, it exposes a function :py:func:`ws2812.set_all`, which works a similar fashion. The ``ws2812`` module controls LEDs of the WS2812 type. Just as the ``leds`` module, it exposes a function :py:func:`ws2812.set_all`, which works a similar fashion.
.. versionadded:: 1.10
.. py:function:: set_all(pin, colors) .. py:function:: set_all(pin, colors)
Set multiple of the LEDs to RGB values. Set multiple of the LEDs to RGB values.
...@@ -28,3 +30,4 @@ The ``ws2812`` module controls LEDs of the WS2812 type. Just as the ``leds`` mod ...@@ -28,3 +30,4 @@ The ``ws2812`` module controls LEDs of the WS2812 type. Just as the ``leds`` mod
i += 1 i += 1
utime.sleep_ms(10) utime.sleep_ms(10)
.. versionadded:: 1.10
...@@ -604,6 +604,8 @@ API(API_LEDS_SET, void epic_leds_set(int led, uint8_t r, uint8_t g, uint8_t b)); ...@@ -604,6 +604,8 @@ API(API_LEDS_SET, void epic_leds_set(int led, uint8_t r, uint8_t g, uint8_t b));
* are the 4 "ambient" LEDs. * are the 4 "ambient" LEDs.
* :param uint8_t * rgb: need tree byte array to get the value of red, green and blue. * :param uint8_t * rgb: need tree byte array to get the value of red, green and blue.
* :returns: ``0`` on success or ``-EPERM`` if the LED is blocked by personal-state. * :returns: ``0`` on success or ``-EPERM`` if the LED is blocked by personal-state.
*
* .. versionadded:: 1.10
*/ */
API(API_LEDS_GET, int epic_leds_get_rgb(int led, uint8_t * rgb)); API(API_LEDS_GET, int epic_leds_get_rgb(int led, uint8_t * rgb));
...@@ -755,6 +757,8 @@ API(API_LEDS_SET_ROCKET, void epic_leds_set_rocket(int led, uint8_t value)); ...@@ -755,6 +757,8 @@ API(API_LEDS_SET_ROCKET, void epic_leds_set_rocket(int led, uint8_t value));
* | ``2`` | Green | Right | * | ``2`` | Green | Right |
* +-------+--------+----------+ * +-------+--------+----------+
* :returns value: Brightness of LED (value between 0 and 31) or ``-EINVAL`` if the LED/rocket does not exists. * :returns value: Brightness of LED (value between 0 and 31) or ``-EINVAL`` if the LED/rocket does not exists.
*
* .. versionadded:: 1.10
*/ */
API(API_LEDS_GET_ROCKET, int epic_leds_get_rocket(int led)); API(API_LEDS_GET_ROCKET, int epic_leds_get_rocket(int led));
...@@ -1876,6 +1880,8 @@ API(API_USB_CDCACM, int epic_usb_cdcacm(void)); ...@@ -1876,6 +1880,8 @@ API(API_USB_CDCACM, int epic_usb_cdcacm(void));
* :param uint8_t pin: The gpio pin to be used for data. * :param uint8_t pin: The gpio pin to be used for data.
* :param uint8_t * pixels: The buffer, in which the pixel data is stored. * :param uint8_t * pixels: The buffer, in which the pixel data is stored.
* :param uint32_t n_bytes: The size of the buffer. * :param uint32_t n_bytes: The size of the buffer.
*
* .. versionadded:: 1.10
*/ */
API(API_WS2812_WRITE, void epic_ws2812_write(uint8_t pin, uint8_t *pixels, uint32_t n_bytes)); API(API_WS2812_WRITE, void epic_ws2812_write(uint8_t pin, uint8_t *pixels, uint32_t n_bytes));
......
...@@ -89,6 +89,8 @@ def get_rocket(led): ...@@ -89,6 +89,8 @@ def get_rocket(led):
+-------+--------+----------+ +-------+--------+----------+
:rtype: int :rtype: int
:returns: Brightness of LED (value between 0 and 31). :returns: Brightness of LED (value between 0 and 31).
.. versionadded:: 1.10
""" """
return sys_leds.get_rocket(led) return sys_leds.get_rocket(led)
...@@ -159,6 +161,8 @@ def get_rgb(led): ...@@ -159,6 +161,8 @@ def get_rgb(led):
:param int led: Which LED to set. 0-10 are the LEDs on the top and 11-14 :param int led: Which LED to set. 0-10 are the LEDs on the top and 11-14
are the 4 "ambient" LEDs are the 4 "ambient" LEDs
:return [r,g,b] color: RGB triplet :return [r,g,b] color: RGB triplet
.. versionadded:: 1.10
""" """
return sys_leds.get_rgb(led) return sys_leds.get_rgb(led)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment