Skip to content

Commit 9211a3a

Browse files
committed
Enable SPI_3
1 parent b78542d commit 9211a3a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PeripheralNames.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ typedef enum {
127127
SPI_0 = 0,
128128
SPI_1,
129129
SPI_2,
130+
SPI_3,
130131
} SPIName;
131132

132133
typedef enum {

libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static const PinMap PinMap_SPI_SCLK[] = {
2727
{P4_4 , SPI_1, 2},
2828
{P11_12, SPI_1, 2},
2929
{P8_3 , SPI_2, 3},
30+
{P5_0 , SPI_3, 8},
3031
{NC , NC , 0}
3132
};
3233

@@ -35,6 +36,7 @@ static const PinMap PinMap_SPI_SSEL[] = {
3536
{P4_5 , SPI_1, 2},
3637
{P11_13, SPI_1, 2},
3738
{P8_4 , SPI_2, 3},
39+
{P5_1 , SPI_3, 8},
3840
{NC , NC , 0}
3941
};
4042

@@ -43,6 +45,7 @@ static const PinMap PinMap_SPI_MOSI[] = {
4345
{P4_6 , SPI_1, 2},
4446
{P11_14, SPI_1, 2},
4547
{P8_5 , SPI_2, 3},
48+
{P5_2 , SPI_3, 8},
4649
{NC , NC , 0}
4750
};
4851

@@ -51,6 +54,7 @@ static const PinMap PinMap_SPI_MISO[] = {
5154
{P4_7 , SPI_1, 2},
5255
{P11_15, SPI_1, 2},
5356
{P8_6 , SPI_2, 3},
57+
{P5_3 , SPI_3, 8},
5458
{NC , NC , 0}
5559
};
5660

@@ -82,6 +86,7 @@ void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel
8286
case SPI_0: CPGSTBCR10 &= ~(0x80); break;
8387
case SPI_1: CPGSTBCR10 &= ~(0x40); break;
8488
case SPI_2: CPGSTBCR10 &= ~(0x20); break;
89+
case SPI_3: CPGSTBCR10 &= ~(0x10); break;
8590
}
8691
dummy = CPGSTBCR10;
8792

0 commit comments

Comments
 (0)