|
- /**
- * \file
- *
- * \brief SAMR34 Sendcomm user application template
- *
- * Copyright (c) 2020 Europalab Devices ApS
- *
- * \asf_license_start
- *
- * \page License
- *
- * This file is part of Sendcomm.
- *
- * Sendcomm is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Sendcomm is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Sendcomm. If not, see <https://www.gnu.org/licenses/>.
- *
- * \asf_license_stop
- *
- */
-
- /**
- * \mainpage User Application template doxygen documentation
- *
- * \par Empty user application template
- *
- * This is a bare minimum user application template.
- *
- * For documentation of the board, go \ref group_common_boards "here" for a link
- * to the board-specific documentation.
- *
- * \par Content
- *
- * -# Include the ASF header files (through asf.h)
- * -# Minimal main function that starts with a call to system_init()
- * -# Basic usage of on-board LED and button
- * -# "Insert application code here" comment
- *
- */
-
- /*
- * Include header files for all drivers that have been imported from
- * Atmel Software Framework (ASF).
- */
- /*
- * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
- */
- #include <asf.h>
-
- int main (void)
- {
- system_init();
-
- /* Insert application code here, after the board has been initialized. */
-
- /* This skeleton code simply sets the LED to the state of the button. */
- while (1) {
- /* Is button pressed? */
- if (port_pin_get_input_level(BUTTON_0_PIN) == BUTTON_0_ACTIVE) {
- /* Yes, so turn LED on. */
- port_pin_set_output_level(LED_0_PIN, LED_0_ACTIVE);
- } else {
- /* No, so turn LED off. */
- port_pin_set_output_level(LED_0_PIN, !LED_0_ACTIVE);
- }
- }
- }
|