Monitor motorhome leisure battery and provide simple control of habitation
Dependencies: net lpc1768 crypto clock web fram log
Diff: lpc1768-this/periphs.c
- Revision:
- 9:d957af50fdc2
- Parent:
- 2:5229cab71d69
diff -r 92e0586333d8 -r d957af50fdc2 lpc1768-this/periphs.c --- a/lpc1768-this/periphs.c Mon May 10 08:45:07 2021 +0000 +++ b/lpc1768-this/periphs.c Mon Jun 06 11:08:53 2022 +0000 @@ -22,6 +22,7 @@ PCONP |= 1 << 6; //PWM1 PCONP |= 1 << 9; //RTC PCONP |= 1 << 10; //SSP1 + PCONP |= 1 << 14; //PCCAN2 PCONP |= 1 << 15; //GPIO PCONP |= 1 << 16; //RIT PCONP |= 1 << 19; //I2C1 @@ -44,6 +45,8 @@ PINSEL0 |= 3U << 2; //P0.01 11 SCL1 I2C1 PINSEL0 |= 1U << 4; //P0.02 01 TXD0 UART0 PINSEL0 |= 1U << 6; //P0.03 01 RXD0 UART0 + PINSEL0 |= 2U << 8; //P0.04 11 RD2 PCCAN2 + PINSEL0 |= 2U << 10; //P0.05 11 TD2 PCCAN2 PINSEL0 |= 2U << 14; //P0.07 10 SCK1 SSP1 PINSEL0 |= 2U << 16; //P0.08 10 MISO1 SSP1 PINSEL0 |= 2U << 18; //P0.09 10 MOSI1 SSP1 @@ -63,12 +66,10 @@ PINSEL3 = 0; PINSEL3 |= 1U << 0; //P1.16 01 ENET_MDC PINSEL3 |= 1U << 2; //P1.17 01 ENET_MDIO - //PINSEL3 |= 2U << 4; //P1.18 10 PWM1.1 PINSEL4 = 0; PINSEL4 |= 1U << 0; //P2.00 01 PWM1.1 - PINMODE0 = 0; PINMODE0 |= 2U << 0; //P0.00 10 SDA1 I2C1 Neither pull up nor pull down PINMODE0 |= 2U << 2; //P0.01 10 SCL1 I2C1 Neither pull up nor pull down @@ -76,11 +77,4 @@ PINMODE_OD0 = 0; PINMODE_OD0 |= 1 << 0; //P0.00 10 SDA1 I2C1 Open drain mode PINMODE_OD0 |= 1 << 1; //P0.01 10 SCL1 I2C1 Open drain mode - - - PINMODE4 = 0; - //PINMODE4 |= 2U << 0; //P2.00 10 PWM1.1 p26 Neither pull up nor pull down - - PINMODE_OD2 = 0; - //PINMODE_OD2 |= 1 << 0; //P2.00 10 PWM1.1 p26 Open drain mode }