Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ports_psoc6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Micropython PSoC6 ${{ github.ref_name }}
name: MicroPython PSoC6 ${{ github.ref_name }}
files: mpy-psoc6_${{ matrix.board }}.hex
body: ${{steps.build_changelog.outputs.changelog}}
6 changes: 4 additions & 2 deletions ports/psoc6/machine_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ static inline void spi_obj_free(machine_spi_obj_t *spi_obj_ptr) {

static inline void spi_init(machine_spi_obj_t *machine_spi_obj, int spi_mode) {
cyhal_spi_mode_t mode = spi_mode_select(machine_spi_obj->firstbit, machine_spi_obj->polarity, machine_spi_obj->phase);
// set the baudrate
cyhal_spi_set_frequency(&machine_spi_obj->spi_obj, machine_spi_obj->baudrate);

// Initialise the SPI peripheral if any arguments given, or it was not initialised previously.
cy_rslt_t result = cyhal_spi_init(&machine_spi_obj->spi_obj, machine_spi_obj->mosi, machine_spi_obj->miso, machine_spi_obj->sck, machine_spi_obj->ssel, NULL, machine_spi_obj->bits, mode, spi_mode);
assert_pin_phy_used(result);
spi_assert_raise_val("SPI initialisation failed with return code %x !", result);

// set the baudrate
cyhal_spi_set_frequency(&machine_spi_obj->spi_obj, machine_spi_obj->baudrate);
}

static void machine_spi_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
Expand Down
2 changes: 1 addition & 1 deletion tools/psoc6/mpy-psoc6.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def __call__(self, parser, namespace, values, option_string, **kwargs):
parser.exit()

main_parser_desc = """
Micropython PSoC6 utility script
MicroPython PSoC6 utility script

Available commands:

Expand Down
Loading