mirror of
https://github.com/esp8266/Arduino.git
synced 2025-12-01 17:57:53 +03:00
[sam] merging CMSIS with current internal dev
This commit is contained in:
@@ -98,6 +98,15 @@ typedef enum _EAnalogChannel
|
||||
DAC1
|
||||
} EAnalogChannel ;
|
||||
|
||||
/**
|
||||
* Pin Attributes to be OR-ed
|
||||
*/
|
||||
#define PIN_ATTR_COMBO (1UL<<0)
|
||||
#define PIN_ATTR_ANALOG (1UL<<1)
|
||||
#define PIN_ATTR_DIGITAL (1UL<<2)
|
||||
#define PIN_ATTR_PWM (1UL<<3)
|
||||
#define PIN_ATTR_TIMER (1UL<<4)
|
||||
|
||||
/* Types used for the tables below */
|
||||
typedef struct _PinDescription
|
||||
{
|
||||
@@ -105,6 +114,7 @@ typedef struct _PinDescription
|
||||
uint32_t ulPin ;
|
||||
uint32_t ulPeripheralId ;
|
||||
EPioType ulPinType ;
|
||||
uint32_t ulPinConfiguration ;
|
||||
uint32_t ulPinAttribute ;
|
||||
EAnalogChannel ulAnalogChannel ;
|
||||
} PinDescription ;
|
||||
|
||||
@@ -27,7 +27,7 @@ extern void pinMode( uint32_t ulPin, uint32_t ulMode )
|
||||
{
|
||||
PMC_DisablePeripheral( g_APinDescription[ulPin].ulPeripheralId ) ;
|
||||
}
|
||||
PIO_Configure( g_APinDescription[ulPin].pPort, PIO_OUTPUT_1, g_APinDescription[ulPin].ulPin, g_APinDescription[ulPin].ulPinAttribute ) ;
|
||||
PIO_Configure( g_APinDescription[ulPin].pPort, PIO_OUTPUT_1, g_APinDescription[ulPin].ulPin, g_APinDescription[ulPin].ulPinConfiguration ) ;
|
||||
break ;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user