Skip to content

Commit 96c6271

Browse files
committed
apply suggestions from reviews
- minor typo fix - update documentation for board module
1 parent 5939c11 commit 96c6271

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

shared-bindings/board/__init__.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ STATIC mp_int_t board_get_instance(size_t n_args, const mp_obj_t *args, const mp
6565
#endif
6666

6767
//| def I2C(instance: Optional[int] = 0) -> busio.I2C:
68-
//| """Returns the `busio.I2C` object for the board's designated I2C bus(es). It is a singleton.
69-
//| The object created uses the default parameter values for `busio.I2C`."""
68+
//| """Returns the `busio.I2C` object for the board's designated I2C bus(es).
69+
//| If there is more than one default I2C bus, the buses are numbered starting at 0.
70+
//| The object created is a singleton, and uses the default parameter values for `busio.I2C`."""
7071
//| ...
7172
//|
7273
#if CIRCUITPY_BOARD_I2C
@@ -87,8 +88,9 @@ mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args) {
8788
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj, 0, 1, board_i2c);
8889

8990
//| def SPI(instance: Optional[int] = 0) -> busio.SPI:
90-
//| """Returns the `busio.SPI` object for the board's designated SPI bus(es). It is a singleton.
91-
//| The object created uses the default parameter values for `busio.SPI`."""
91+
//| """Returns the `busio.SPI` object for the board's designated SPI bus(es).
92+
//| If there is more than one default SPI bus, the buses are numbered starting at 0.
93+
//| The object created is a singleton, and uses the default parameter values for `busio.SPI`."""
9294
//| ...
9395
//|
9496
#if CIRCUITPY_BOARD_SPI
@@ -109,8 +111,9 @@ mp_obj_t board_spi(size_t n_args, const mp_obj_t *args) {
109111
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj, 0, 1, board_spi);
110112

111113
//| def UART(instance: Optional[int] = 0) -> busio.UART:
112-
//| """Returns the `busio.UART` object for the board's designated UART bus(es). It is a singleton.
113-
//| The object created uses the default parameter values for `busio.UART`."""
114+
//| """Returns the `busio.UART` object for the board's designated UART bus(es).
115+
//| If there is more than one default UART bus, the buses are numbered starting at 0.
116+
//| The object created is a singleton, and uses the default parameter values for `busio.UART`."""
114117
//| ...
115118
//|
116119
#if CIRCUITPY_BOARD_UART

shared-bindings/board/__init__.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ extern const mp_obj_dict_t board_module_globals;
3636
STATIC const MP_DEFINE_STR_OBJ(board_module_id_obj, CIRCUITPY_BOARD_ID);
3737

3838
bool common_hal_board_is_i2c(mp_obj_t obj);
39-
mp_obj_t common_hal_board_get_i2c(const mp_int_t insatnce);
39+
mp_obj_t common_hal_board_get_i2c(const mp_int_t instance);
4040
mp_obj_t common_hal_board_create_i2c(const mp_int_t instance);
4141
mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args);
4242
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj);
4343

4444
bool common_hal_board_is_spi(mp_obj_t obj);
45-
mp_obj_t common_hal_board_get_spi(const mp_int_t insatnce);
45+
mp_obj_t common_hal_board_get_spi(const mp_int_t instance);
4646
mp_obj_t common_hal_board_create_spi(const mp_int_t instance);
4747
mp_obj_t board_spi(size_t n_args, const mp_obj_t *args);
4848
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj);
4949

5050
bool common_hal_board_is_uart(mp_obj_t obj);
51-
mp_obj_t common_hal_board_get_uart(const mp_int_t insatnce);
51+
mp_obj_t common_hal_board_get_uart(const mp_int_t instance);
5252
mp_obj_t common_hal_board_create_uart(const mp_int_t instance);
5353
mp_obj_t board_uart(size_t n_args, const mp_obj_t *args);
5454
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_uart_obj);

0 commit comments

Comments
 (0)