Europalab Devices produces a LoRaWAN transmitting client node, specialised for higher research of actuator and sensor assisted IoT networks. https://dev.europalab.com/nlnet/20200000/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.1KB

  1. /**
  2. * \file
  3. *
  4. * \brief SAMR34 Sendcomm user application template
  5. *
  6. * Copyright (c) 2020 Europalab Devices ApS
  7. *
  8. * \asf_license_start
  9. *
  10. * \page License
  11. *
  12. * This file is part of Sendcomm.
  13. *
  14. * Sendcomm is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation, either version 3 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * Sendcomm is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with Sendcomm. If not, see <https://www.gnu.org/licenses/>.
  26. *
  27. * \asf_license_stop
  28. *
  29. */
  30. /**
  31. * \mainpage User Application template doxygen documentation
  32. *
  33. * \par Empty user application template
  34. *
  35. * This is a bare minimum user application template.
  36. *
  37. * For documentation of the board, go \ref group_common_boards "here" for a link
  38. * to the board-specific documentation.
  39. *
  40. * \par Content
  41. *
  42. * -# Include the ASF header files (through asf.h)
  43. * -# Minimal main function that starts with a call to system_init()
  44. * -# Basic usage of on-board LED and button
  45. * -# "Insert application code here" comment
  46. *
  47. */
  48. /*
  49. * Include header files for all drivers that have been imported from
  50. * Atmel Software Framework (ASF).
  51. */
  52. /*
  53. * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
  54. */
  55. #include <asf.h>
  56. int main (void)
  57. {
  58. system_init();
  59. /* Insert application code here, after the board has been initialized. */
  60. /* This skeleton code simply sets the LED to the state of the button. */
  61. while (1) {
  62. /* Is button pressed? */
  63. if (port_pin_get_input_level(BUTTON_0_PIN) == BUTTON_0_ACTIVE) {
  64. /* Yes, so turn LED on. */
  65. port_pin_set_output_level(LED_0_PIN, LED_0_ACTIVE);
  66. } else {
  67. /* No, so turn LED off. */
  68. port_pin_set_output_level(LED_0_PIN, !LED_0_ACTIVE);
  69. }
  70. }
  71. }