Plantilla mejorada con la libreria PinNames.h

Dependencies:   mbed

Revision:
1:9f2e7f4788f9
Parent:
0:9f7581d1af6f
--- a/PinNames.h	Wed Jun 26 18:54:11 2019 +0000
+++ b/PinNames.h	Tue Sep 17 23:16:46 2019 +0000
@@ -5,6 +5,7 @@
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
+ * modification, are permitted provided that the following conditions are met:
  *
  * 1. Redistributions of source code must retain the above copyright notice,
  *    this list of conditions and the following disclaimer.
@@ -38,6 +39,51 @@
 extern "C" {
 #endif
 
+//UART to AMB8826
+#define TXD1      PA_9
+#define RXD1      PA_10
+#define CTS1      PA_11
+int baudRate = 115200;
+
+//UART to Silicon Labs CP210x
+#define TXD2      PA_2
+#define RXD2      PA_3
+
+//UART to FTDI
+#define TXD3      PB_10
+#define RXD3      PB_11
+
+//I2C
+#define I2C1_SCL  PB_6
+#define I2C1_SDA  PB_7
+
+#define I2C2_SCL  PB_10
+#define I2C2_SDA  PB_11
+
+//SPI
+#define SPI1_MOSI PA_7
+#define SPI1_MISO PA_6
+#define SPI1_SCLK PA_5
+#define SPI1_NSS1 PA_4
+#define SDsel     PA_4
+
+#define SPI2_MOSI PB_15
+#define SPI2_MISO PB_14
+#define SPI2_SCLK PB_13
+#define SPI2_NSS2 PB_12
+
+//CAN
+#define CAN1_RX   PA_11
+#define CAN1_TX   PA_12
+
+//USB   CDC
+#define USB_POS   PA_12
+#define USB_NEG   PA_11
+
+//ADC
+#define Uin       PA_1
+#define Ubatt     PA_0
+
 typedef enum {
     // Not connected
     NC = (int)0xFFFFFFFF,
@@ -139,13 +185,14 @@
     USBRX       = PA_11,
     CANRX       = PB_8,    
     CANTX       = PB_9,
-    I2C_SCL     = PB_8,
-    I2C_SDA     = PB_9,
+    I2C_SCL     = PB_6,
+    I2C_SDA     = PB_7,
     SPI_MOSI    = PA_7,
     SPI_MISO    = PA_6,
     SPI_SCK     = PA_5,
-    SPI_CS      = PB_6,
-    PWM_OUT     = PB_3
+    SPI_CS      = PA_4,
+    TRACE_SWO   = PB_3,
+    SWO         = PB_3
 } PinName;
 
 #ifdef __cplusplus