Skip to content

Commit ff41cc9

Browse files
authored
Merge pull request #3806 from 0xc0170/fix_issue#2989
NXP KL43Z/KL27Z: fix spi format bits check
2 parents 4470d04 + bf77857 commit ff41cc9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL27Z/spi_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
6565
spi_master_config_t master_config;
6666
spi_slave_config_t slave_config;
6767

68-
if ((bits != 8) || (bits != 16)) {
68+
if ((bits != 8) && (bits != 16)) {
6969
error("Only 8bits and 16bits SPI supported");
7070
return;
7171
}

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL43Z/spi_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
6565
spi_master_config_t master_config;
6666
spi_slave_config_t slave_config;
6767

68-
if ((bits != 8) || (bits != 16)) {
68+
if ((bits != 8) && (bits != 16)) {
6969
error("Only 8bits and 16bits SPI supported");
7070
return;
7171
}

0 commit comments

Comments
 (0)