diff --git a/Documentation/pycardium/stdlib.rst b/Documentation/pycardium/stdlib.rst index 7a1f51c852d1f27247eb7f0a19c97c6576e912db..161f8204ec40df71314b988bb19cf2d50b5873be 100644 --- a/Documentation/pycardium/stdlib.rst +++ b/Documentation/pycardium/stdlib.rst @@ -201,6 +201,8 @@ Struct module. UUID(bytes='\x12\x34\x56\x78' * 4) UUID(int=0x12345678123456781234567812345678) + .. versionadded:: 1.10 + .. py:attribute:: bytes UUID as ``bytes()`` object @@ -221,7 +223,4 @@ Struct module. Generate a new UUID version 4 (random UUID). - .. todo:: - - This function is not yet usable because we don't have - :py:func:`os.urandom` yet. + .. versionadded:: 1.10 diff --git a/Documentation/pycardium/ws2812.rst b/Documentation/pycardium/ws2812.rst index 91ff691f14413e14a0b013946588f01f32863878..fe36f95926d813b07ed6bce395ee912d0f168811 100644 --- a/Documentation/pycardium/ws2812.rst +++ b/Documentation/pycardium/ws2812.rst @@ -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. +.. versionadded:: 1.10 + .. py:function:: set_all(pin, colors) 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 i += 1 utime.sleep_ms(10) + .. versionadded:: 1.10 diff --git a/epicardium/epicardium.h b/epicardium/epicardium.h index 4fb34d8c6cc3839c88455209c085b3a63da33e0e..2428cb583fe0924fb33a1046bb1693e2349a5ad3 100644 --- a/epicardium/epicardium.h +++ b/epicardium/epicardium.h @@ -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. * :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. + * + * .. versionadded:: 1.10 */ 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)); * | ``2`` | Green | Right | * +-------+--------+----------+ * :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)); @@ -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 * pixels: The buffer, in which the pixel data is stored. * :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)); diff --git a/pycardium/modules/py/leds.py b/pycardium/modules/py/leds.py index 25aa3c19747dd92f8d48397c6f0491553c2eecd8..75f3aac87dbb362f16a8dc1c1f993c13f22ac158 100644 --- a/pycardium/modules/py/leds.py +++ b/pycardium/modules/py/leds.py @@ -89,6 +89,8 @@ def get_rocket(led): +-------+--------+----------+ :rtype: int :returns: Brightness of LED (value between 0 and 31). + + .. versionadded:: 1.10 """ return sys_leds.get_rocket(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 are the 4 "ambient" LEDs :return [r,g,b] color: RGB triplet + + .. versionadded:: 1.10 """ return sys_leds.get_rgb(led)