Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Feature definitions

Macros

#define AT25DFX_CS   2
 
#define AT25DFX_SPI_MODULE   SPI
 
#define FOSC0   (12000000)
 Osc frequency (Hz.) and startup time (RCOsc periods). More...
 
#define FOSC32   (32768)
 Osc32 frequency (Hz.) and startup time (RCOsc periods). More...
 

Board oscillator configuration

#define BOARD_OSC32_IS_XTAL   true
 OSC32 uses a crystal, not an external clock. More...
 
#define BOARD_OSC32_HZ   FOSC32
 Clock frequency of OSC32 in Hz. More...
 
#define BOARD_OSC32_STARTUP_US   (1100000)
 Startup time of OSC32 in microseconds. More...
 
#define BOARD_OSC32_SELCURR   BSCIF_OSCCTRL32_SELCURR(10)
 Crystal current selection for OSC32. More...
 
#define BOARD_OSC0_IS_XTAL   true
 OSC0 uses a crystal, not an external clock. More...
 
#define BOARD_OSC0_HZ   FOSC0
 Clock frequency of OSC0 in Hz. More...
 
#define BOARD_OSC0_STARTUP_US   (1100)
 Startup time of OSC0 in microseconds. More...
 

Number of LEDs.

#define LED_COUNT   1
 

LEDs

LED0 is a single yellow LED that is active low.

#define LED0   PC10
 
#define LED0_GPIO   PIN_PC10
 
#define LED0_GPIO_MASK   GPIO_PC10
 
#define LED0_ACTIVE_LEVEL   IOPORT_PIN_LEVEL_HIGH
 
#define LED0_INACTIVE_LEVEL   IOPORT_PIN_LEVEL_LOW
 

LCD Backlight

#define LCD_BL   PC14
 
#define LCD_BL_GPIO   PIN_PC14
 
#define LCD_BL_GPIO_MASK   GPIO_PC14
 
#define LCD_BL_ACTIVE_LEVEL   IOPORT_PIN_LEVEL_HIGH
 
#define LCD_BL_INACTIVE_LEVEL   IOPORT_PIN_LEVEL_LOW
 

GPIO Connections of Push Buttons

#define GPIO_PUSH_BUTTON_0   PIN_PC03
 
#define GPIO_PUSH_BUTTON_0_MASK   GPIO_PC03
 
#define PUSH_BUTTON_0_DOWN_LEVEL   IOPORT_PIN_LEVEL_LOW
 
#define PUSH_BUTTON_0_UP_LEVEL   IOPORT_PIN_LEVEL_HIGH
 
#define BUTTON_0_NAME   "PB0"
 
#define PUSH_BUTTON_0_NAME   BUTTON_0_NAME
 

Push Button Connection on External Interrupt line

#define GPIO_PUSH_BUTTON_EIC_PIN   PIN_PC03B_EIC_EXTINT5
 
#define GPIO_PUSH_BUTTON_EIC_PIN_MASK   GPIO_PC03B_EIC_EXTINT5
 
#define GPIO_PUSH_BUTTON_EIC_PIN_MUX   MUX_PC03B_EIC_EXTINT5
 
#define GPIO_PUSH_BUTTON_EIC_LINE   5
 
#define GPIO_PUSH_BUTTON_EIC_IRQ   EIC_5_IRQn
 
#define GPIO_UNIT_TEST_EIC_PIN   PIN_PA06C_EIC_EXTINT1
 
#define GPIO_UNIT_TEST_EIC_PIN_MASK   GPIO_PA06C_EIC_EXTINT1
 
#define GPIO_UNIT_TEST_EIC_PIN_MUX   MUX_PA06C_EIC_EXTINT1
 
#define GPIO_UNIT_TEST_EIC_LINE   1
 
#define GPIO_EIC_TRIG_PIN   PIN_PB05
 

GPIO Connections of Touch sensors

#define GPIO_QTOUCH_SLIDER_0   PIN_PB02
 
#define GPIO_QTOUCH_SLIDER_0_MASK   GPIO_PB02
 
#define GPIO_QTOUCH_SLIDER_0_MUX   MUX_PB02G_CATB_SENSE23
 
#define GPIO_QTOUCH_SLIDER_1   PIN_PA04
 
#define GPIO_QTOUCH_SLIDER_1_MASK   GPIO_PA04
 
#define GPIO_QTOUCH_SLIDER_1_MUX   MUX_PA04G_CATB_SENSE0
 
#define GPIO_QTOUCH_SLIDER_2   PIN_PA05
 
#define GPIO_QTOUCH_SLIDER_2_MASK   GPIO_PA05
 
#define GPIO_QTOUCH_SLIDER_2_MUX   MUX_PA05G_CATB_SENSE1
 
#define GPIO_QTOUCH_DISCHARGE   PIN_PB03
 
#define GPIO_QTOUCH_DISCHARGE_MASK   GPIO_PB03
 
#define GPIO_QTOUCH_DISCHARGE_MUX   MUX_PB03G_CATB_DIS
 
#define GPIO_QTOUCH_BUTTON   PIN_PB04
 
#define GPIO_QTOUCH_BUTTON_MASK   GPIO_PB04
 
#define GPIO_QTOUCH_BUTTON_MUX   MUX_PB04G_CATB_SENSE24
 

Touch sensors pin assignements

#define QTOUCH_PINSEL_SLIDER_0   23
 
#define QTOUCH_PINSEL_SLIDER_1   0
 
#define QTOUCH_PINSEL_SLIDER_2   1
 
#define QTOUCH_PINSEL_BUTTON   24
 

GPIO Connections of SAM4L4C VBUS Power Control

#define USB_VBOF_PIN   PIN_PC08 /* As IO pin output */
 
#define USB_VBOF_ACTIVE_LEVEL   0
 
#define USB_VBOF_INACTIVE_LEVEL   1
 

GPIO Connections of SAM4L4C VBUS error detecting

#define USB_VBERR_FLAGS   IOPORT_MODE_PULLUP | IOPORT_MODE_GLITCH_FILTER
 
#define USB_VBERR_PIN   PIN_PC07 /* As IO pin input */
 

GPIO Connections of SAM4L4C ID detecting

#define USB_ID_FLAGS   IOPORT_MODE_PULLUP | IOPORT_MODE_GLITCH_FILTER
 
#define USB_ID_PIN   PIN_PB05 /* As IO pin input */
 

USART connections to GPIO for Virtual Com Port

#define COM_PORT_USART   USART2
 
#define COM_PORT_USART_ID   ID_USART2
 
#define COM_PORT_RX_PIN   PIN_PC11B_USART2_RXD
 
#define COM_PORT_RX_GPIO   GPIO_PC11B_USART2_RXD
 
#define COM_PORT_RX_MUX   MUX_PC11B_USART2_RXD
 
#define COM_PORT_TX_PIN   PIN_PC12B_USART2_TXD
 
#define COM_PORT_TX_GPIO   GPIO_PC12B_USART2_TXD
 
#define COM_PORT_TX_MUX   MUX_PC12B_USART2_TXD
 

USART connections to the Board Monitor

#define BM_USART_USART   USART0
 
#define BM_USART_USART_ID   ID_USART0
 
#define BM_USART_RX_PIN   PIN_PC02C_USART0_RXD
 
#define BM_USART_RX_GPIO   GPIO_PC02C_USART0_RXD
 
#define BM_USART_RX_MUX   MUX_PC02C_USART0_RXD
 
#define BM_USART_TX_PIN   PIN_PA07B_USART0_TXD
 
#define BM_USART_TX_GPIO   GPIO_PA07B_USART0_TXD
 
#define BM_USART_TX_MUX   MUX_PA07B_USART0_TXD
 

USART connections to the RS485

#define RS485_USART_USART   USART0
 
#define RS485_USART_USART_ID   ID_USART0
 
#define RS485_USART_RX_PIN   PIN_PC02C_USART0_RXD
 
#define RS485_USART_RX_GPIO   GPIO_PC02C_USART0_RXD
 
#define RS485_USART_RX_MUX   MUX_PC02C_USART0_RXD
 
#define RS485_USART_TX_PIN   PIN_PA07B_USART0_TXD
 
#define RS485_USART_TX_GPIO   GPIO_PA07B_USART0_TXD
 
#define RS485_USART_TX_MUX   MUX_PA07B_USART0_TXD
 
#define RS485_USART_RTS_PIN   PIN_PA06B_USART0_RTS
 
#define RS485_USART_RTS_GPIO   GPIO_PA06B_USART0_RTS
 
#define RS485_USART_RTS_MUX   MUX_PA06B_USART0_RTS
 
#define RS485_USART_CTS_PIN   PIN_PC08E_USART2_CTS
 
#define RS485_USART_CTS_GPIO   GPIO_PC08E_USART2_CTS
 
#define RS485_USART_CTS_MUX   MUX_PC08E_USART2_CTS
 

TWIMS1 pins

#define TWIMS1_TWI_SDA_PIN   PIN_PB00A_TWIMS1_TWD
 
#define TWIMS1_TWI_SDA_GPIO   GPIO_PB00A_TWIMS1_TWD
 
#define TWIMS1_TWI_SDA_MUX   MUX_PB00A_TWIMS1_TWD
 
#define TWIMS1_TWI_SCL_PIN   PIN_PB01A_TWIMS1_TWCK
 
#define TWIMS1_TWI_SCL_GPIO   GPIO_PB01A_TWIMS1_TWCK
 
#define TWIMS1_TWI_SCL_MUX   MUX_PB01A_TWIMS1_TWCK
 

USART0 pins

#define USART0_RX_PIN   PIN_PC02C_USART0_RXD
 
#define USART0_RX_MUX   MUX_PC02C_USART0_RXD
 
#define USART0_RX_GPIO   GPIO_PC02C_USART0_RXD
 
#define USART0_TX_PIN   PIN_PA07B_USART0_TXD
 
#define USART0_TX_MUX   MUX_PA07B_USART0_TXD
 
#define USART0_TX_GPIO   GPIO_PA07B_USART0_TXD
 

DACC pins

#define DACC_EXT_TRIG0_PIN   PIN_PB04E_DACC_EXT_TRIG0
 
#define DACC_EXT_TRIG0_GPIO   GPIO_PB04E_DACC_EXT_TRIG0
 
#define DACC_EXT_TRIG0_MUX   MUX_PB04E_DACC_EXT_TRIG0
 
#define DACC_VOUT_PIN   PIN_PA06A_DACC_VOUT
 
#define DACC_VOUT_GPIO   GPIO_PA06A_DACC_VOUT
 
#define DACC_VOUT_MUX   MUX_PA06A_DACC_VOUT
 

#define AT25DFX_CS   2
#define AT25DFX_SPI_MODULE   SPI
#define BM_USART_RX_GPIO   GPIO_PC02C_USART0_RXD
#define BM_USART_RX_MUX   MUX_PC02C_USART0_RXD

Referenced by board_init().

#define BM_USART_RX_PIN   PIN_PC02C_USART0_RXD

Referenced by board_init().

#define BM_USART_TX_GPIO   GPIO_PA07B_USART0_TXD
#define BM_USART_TX_MUX   MUX_PA07B_USART0_TXD

Referenced by board_init().

#define BM_USART_TX_PIN   PIN_PA07B_USART0_TXD

Referenced by board_init().

#define BM_USART_USART_ID   ID_USART0
#define BOARD_OSC0_HZ   FOSC0

Clock frequency of OSC0 in Hz.

Referenced by dfll_priv_get_source_hz(), osc_get_rate(), and sysclk_get_main_hz().

#define BOARD_OSC0_IS_XTAL   true

OSC0 uses a crystal, not an external clock.

#define BOARD_OSC0_STARTUP_US   (1100)

Startup time of OSC0 in microseconds.

#define BOARD_OSC32_HZ   FOSC32

Clock frequency of OSC32 in Hz.

Referenced by dfll_priv_get_source_hz(), and osc_get_rate().

#define BOARD_OSC32_IS_XTAL   true

OSC32 uses a crystal, not an external clock.

#define BOARD_OSC32_SELCURR   BSCIF_OSCCTRL32_SELCURR(10)

Crystal current selection for OSC32.

If not defined, the recommended value (300nA) are used.

#define BOARD_OSC32_STARTUP_US   (1100000)

Startup time of OSC32 in microseconds.

#define BUTTON_0_NAME   "PB0"
#define COM_PORT_RX_GPIO   GPIO_PC11B_USART2_RXD
#define COM_PORT_RX_MUX   MUX_PC11B_USART2_RXD

Referenced by board_init().

#define COM_PORT_RX_PIN   PIN_PC11B_USART2_RXD

Referenced by board_init().

#define COM_PORT_TX_GPIO   GPIO_PC12B_USART2_TXD
#define COM_PORT_TX_MUX   MUX_PC12B_USART2_TXD

Referenced by board_init().

#define COM_PORT_TX_PIN   PIN_PC12B_USART2_TXD

Referenced by board_init().

#define COM_PORT_USART   USART2
#define COM_PORT_USART_ID   ID_USART2
#define DACC_EXT_TRIG0_GPIO   GPIO_PB04E_DACC_EXT_TRIG0
#define DACC_EXT_TRIG0_MUX   MUX_PB04E_DACC_EXT_TRIG0
#define DACC_EXT_TRIG0_PIN   PIN_PB04E_DACC_EXT_TRIG0
#define DACC_VOUT_GPIO   GPIO_PA06A_DACC_VOUT
#define DACC_VOUT_MUX   MUX_PA06A_DACC_VOUT

Referenced by board_init().

#define DACC_VOUT_PIN   PIN_PA06A_DACC_VOUT

Referenced by board_init().

#define FOSC0   (12000000)

Osc frequency (Hz.) and startup time (RCOsc periods).

#define FOSC32   (32768)

Osc32 frequency (Hz.) and startup time (RCOsc periods).

#define GPIO_EIC_TRIG_PIN   PIN_PB05
#define GPIO_PUSH_BUTTON_0   PIN_PC03

Referenced by ui_process().

#define GPIO_PUSH_BUTTON_0_MASK   GPIO_PC03
#define GPIO_PUSH_BUTTON_EIC_IRQ   EIC_5_IRQn
#define GPIO_PUSH_BUTTON_EIC_LINE   5
#define GPIO_PUSH_BUTTON_EIC_PIN   PIN_PC03B_EIC_EXTINT5

Referenced by board_init().

#define GPIO_PUSH_BUTTON_EIC_PIN_MASK   GPIO_PC03B_EIC_EXTINT5
#define GPIO_PUSH_BUTTON_EIC_PIN_MUX   MUX_PC03B_EIC_EXTINT5

Referenced by board_init().

#define GPIO_QTOUCH_BUTTON   PIN_PB04
#define GPIO_QTOUCH_BUTTON_MASK   GPIO_PB04
#define GPIO_QTOUCH_BUTTON_MUX   MUX_PB04G_CATB_SENSE24
#define GPIO_QTOUCH_DISCHARGE   PIN_PB03
#define GPIO_QTOUCH_DISCHARGE_MASK   GPIO_PB03
#define GPIO_QTOUCH_DISCHARGE_MUX   MUX_PB03G_CATB_DIS
#define GPIO_QTOUCH_SLIDER_0   PIN_PB02
#define GPIO_QTOUCH_SLIDER_0_MASK   GPIO_PB02
#define GPIO_QTOUCH_SLIDER_0_MUX   MUX_PB02G_CATB_SENSE23
#define GPIO_QTOUCH_SLIDER_1   PIN_PA04
#define GPIO_QTOUCH_SLIDER_1_MASK   GPIO_PA04
#define GPIO_QTOUCH_SLIDER_1_MUX   MUX_PA04G_CATB_SENSE0
#define GPIO_QTOUCH_SLIDER_2   PIN_PA05
#define GPIO_QTOUCH_SLIDER_2_MASK   GPIO_PA05
#define GPIO_QTOUCH_SLIDER_2_MUX   MUX_PA05G_CATB_SENSE1
#define GPIO_UNIT_TEST_EIC_LINE   1
#define GPIO_UNIT_TEST_EIC_PIN   PIN_PA06C_EIC_EXTINT1

Referenced by board_init().

#define GPIO_UNIT_TEST_EIC_PIN_MASK   GPIO_PA06C_EIC_EXTINT1
#define GPIO_UNIT_TEST_EIC_PIN_MUX   MUX_PA06C_EIC_EXTINT1

Referenced by board_init().

#define LCD_BL   PC14
#define LCD_BL_ACTIVE_LEVEL   IOPORT_PIN_LEVEL_HIGH
#define LCD_BL_GPIO   PIN_PC14

Referenced by board_init().

#define LCD_BL_GPIO_MASK   GPIO_PC14
#define LCD_BL_INACTIVE_LEVEL   IOPORT_PIN_LEVEL_LOW

Referenced by board_init().

#define LED0   PC10
#define LED0_ACTIVE_LEVEL   IOPORT_PIN_LEVEL_HIGH
#define LED0_GPIO   PIN_PC10

Referenced by board_init().

#define LED0_GPIO_MASK   GPIO_PC10
#define LED0_INACTIVE_LEVEL   IOPORT_PIN_LEVEL_LOW

Referenced by board_init().

#define LED_COUNT   1
#define PUSH_BUTTON_0_DOWN_LEVEL   IOPORT_PIN_LEVEL_LOW
#define PUSH_BUTTON_0_NAME   BUTTON_0_NAME
#define PUSH_BUTTON_0_UP_LEVEL   IOPORT_PIN_LEVEL_HIGH
#define QTOUCH_PINSEL_BUTTON   24
#define QTOUCH_PINSEL_SLIDER_0   23
#define QTOUCH_PINSEL_SLIDER_1   0
#define QTOUCH_PINSEL_SLIDER_2   1
#define RS485_USART_CTS_GPIO   GPIO_PC08E_USART2_CTS
#define RS485_USART_CTS_MUX   MUX_PC08E_USART2_CTS
#define RS485_USART_CTS_PIN   PIN_PC08E_USART2_CTS

Referenced by board_init().

#define RS485_USART_RTS_GPIO   GPIO_PA06B_USART0_RTS
#define RS485_USART_RTS_MUX   MUX_PA06B_USART0_RTS

Referenced by board_init().

#define RS485_USART_RTS_PIN   PIN_PA06B_USART0_RTS

Referenced by board_init().

#define RS485_USART_RX_GPIO   GPIO_PC02C_USART0_RXD
#define RS485_USART_RX_MUX   MUX_PC02C_USART0_RXD

Referenced by board_init().

#define RS485_USART_RX_PIN   PIN_PC02C_USART0_RXD

Referenced by board_init().

#define RS485_USART_TX_GPIO   GPIO_PA07B_USART0_TXD
#define RS485_USART_TX_MUX   MUX_PA07B_USART0_TXD

Referenced by board_init().

#define RS485_USART_TX_PIN   PIN_PA07B_USART0_TXD

Referenced by board_init().

#define RS485_USART_USART   USART0
#define RS485_USART_USART_ID   ID_USART0
#define TWIMS1_TWI_SCL_GPIO   GPIO_PB01A_TWIMS1_TWCK
#define TWIMS1_TWI_SCL_MUX   MUX_PB01A_TWIMS1_TWCK

Referenced by board_init().

#define TWIMS1_TWI_SCL_PIN   PIN_PB01A_TWIMS1_TWCK

Referenced by board_init().

#define TWIMS1_TWI_SDA_GPIO   GPIO_PB00A_TWIMS1_TWD
#define TWIMS1_TWI_SDA_MUX   MUX_PB00A_TWIMS1_TWD

Referenced by board_init().

#define TWIMS1_TWI_SDA_PIN   PIN_PB00A_TWIMS1_TWD

Referenced by board_init().

#define USART0_RX_GPIO   GPIO_PC02C_USART0_RXD
#define USART0_RX_MUX   MUX_PC02C_USART0_RXD

Referenced by board_init().

#define USART0_RX_PIN   PIN_PC02C_USART0_RXD

Referenced by board_init().

#define USART0_TX_GPIO   GPIO_PA07B_USART0_TXD
#define USART0_TX_MUX   MUX_PA07B_USART0_TXD

Referenced by board_init().

#define USART0_TX_PIN   PIN_PA07B_USART0_TXD

Referenced by board_init().

#define USB_ID_FLAGS   IOPORT_MODE_PULLUP | IOPORT_MODE_GLITCH_FILTER

Referenced by board_init().

#define USB_ID_PIN   PIN_PB05 /* As IO pin input */

Referenced by board_init().

#define USB_VBERR_FLAGS   IOPORT_MODE_PULLUP | IOPORT_MODE_GLITCH_FILTER

Referenced by board_init().

#define USB_VBERR_PIN   PIN_PC07 /* As IO pin input */

Referenced by board_init().

#define USB_VBOF_ACTIVE_LEVEL   0
#define USB_VBOF_INACTIVE_LEVEL   1

Referenced by board_init().

#define USB_VBOF_PIN   PIN_PC08 /* As IO pin output */

Referenced by board_init().