Skip to content

Commit b040ba5

Browse files
Ole AarhaugOle Aarhaug
authored andcommitted
MPAE-4702: Added project files and readme
1 parent 9bae2bb commit b040ba5

File tree

237 files changed

+206248
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+206248
-20
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<environment>
2+
<configurations>
3+
<configuration environment="Atmel Studio" name="All" version="7.0.0">
4+
<linker-config>
5+
<option id="avrgcc_linker_miscellaneous_LinkerFlags" name="avrgcc-linker-miscellaneous-LinkerFlags">
6+
<value></value>
7+
</option>
8+
</linker-config>
9+
<linker-script-config/>
10+
<compiler-config>
11+
<option id="avrgcc_compiler_miscellaneous_OtherFlags" name="avrgcc-compiler-miscellaneous-OtherFlags">
12+
<value>-std=gnu99</value>
13+
</option>
14+
</compiler-config>
15+
</configuration>
16+
</configurations>
17+
<device-packs>
18+
<device-pack device="ATmega4809" name="ATmega_DFP" vendor="Atmel" version="1.4.351"/>
19+
</device-packs>
20+
</environment>
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<package xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="1.0" xs:noNamespaceSchemaLocation="PACK.xsd">
2+
<vendor>Atmel</vendor>
3+
<name>ATmega4809 FreeRTOS Example</name>
4+
<description>Project generated by Atmel Start</description>
5+
<url>http://start.atmel.com/</url>
6+
<releases>
7+
<release version="1.0.1">Initial version</release>
8+
</releases>
9+
<taxonomy>
10+
<description Cclass="AtmelStart" generator="AtmelStart">Configuration Files generated by Atmel Start</description>
11+
</taxonomy>
12+
<generators>
13+
<generator id="AtmelStart">
14+
<description>Atmel Start</description>
15+
<select Dname="ATmega4809" Dvendor="Atmel:3"/>
16+
<command>http://start.atmel.com/</command>
17+
<files>
18+
<file category="generator" name="atmel_start_config.atstart"/>
19+
<file attr="template" category="other" name="AtmelStart.env_conf" select="Environment configuration"/>
20+
</files>
21+
</generator>
22+
</generators>
23+
<conditions>
24+
<condition id="AVR Device Startup">
25+
<description>Dependency on Device Startup components</description>
26+
<require Cclass="Device" Cgroup="Startup" Cversion="1.4.0"/>
27+
</condition>
28+
<condition id="ARMCC, GCC, IAR">
29+
<require Dname="ATmega4809"/>
30+
<accept Tcompiler="ARMCC"/>
31+
<accept Tcompiler="GCC"/>
32+
<accept Tcompiler="IAR"/>
33+
</condition>
34+
</conditions>
35+
<components generator="AtmelStart">
36+
<component Cclass="AtmelStart" Cgroup="Framework" Cversion="1.0.0" condition="AVR Device Startup">
37+
<description>Atmel Start Framework</description>
38+
<RTE_Components_h>#define ATMEL_START</RTE_Components_h>
39+
<files>
40+
<file category="other" condition="ARMCC, GCC, IAR" name="doxygen/generator/DoxygenLayout.xml"/>
41+
<file category="other" condition="ARMCC, GCC, IAR" name="doxygen/generator/doxyfile.doxygen"/>
42+
<file category="other" condition="ARMCC, GCC, IAR" name="doxygen/mainpage.dox"/>
43+
<file category="doc" condition="ARMCC, GCC, IAR" name="modules/bod/doc/bod.rst"/>
44+
<file category="doc" condition="ARMCC, GCC, IAR" name="modules/clkctrl/doc/clkctrl.rst"/>
45+
<file category="doc" condition="ARMCC, GCC, IAR" name="modules/cpuint/doc/cpuint.rst"/>
46+
<file category="doc" condition="ARMCC, GCC, IAR" name="modules/slpctrl/doc/slpctrl.rst"/>
47+
<file category="source" condition="ARMCC, GCC, IAR" name="clock.c"/>
48+
<file category="header" condition="ARMCC, GCC, IAR" name="clock.h"/>
49+
<file category="header" condition="ARMCC, GCC, IAR" name="clock_interface.h"/>
50+
<file category="header" condition="ARMCC, GCC, IAR" name="FreeRTOSConfig.h"/>
51+
<file category="source" condition="ARMCC, GCC, IAR" name="keyboard.c"/>
52+
<file category="header" condition="ARMCC, GCC, IAR" name="keyboard.h"/>
53+
<file category="source" condition="ARMCC, GCC, IAR" name="LED.c"/>
54+
<file category="header" condition="ARMCC, GCC, IAR" name="LED.h"/>
55+
<file category="source" condition="ARMCC, GCC, IAR" name="main.c"/>
56+
<file category="source" condition="ARMCC, GCC, IAR" name="spi0.c"/>
57+
<file category="header" condition="ARMCC, GCC, IAR" name="spi0.h"/>
58+
<file category="source" condition="ARMCC, GCC, IAR" name="terminal.c"/>
59+
<file category="header" condition="ARMCC, GCC, IAR" name="terminal.h"/>
60+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/croutine.c"/>
61+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/event_groups.c"/>
62+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/list.c"/>
63+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/queue.c"/>
64+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/stream_buffer.c"/>
65+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/tasks.c"/>
66+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/timers.c"/>
67+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/croutine.h"/>
68+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/deprecated_definitions.h"/>
69+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/event_groups.h"/>
70+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/FreeRTOS.h"/>
71+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/list.h"/>
72+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/message_buffer.h"/>
73+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/mpu_prototypes.h"/>
74+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/mpu_wrappers.h"/>
75+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/portable.h"/>
76+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/projdefs.h"/>
77+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/queue.h"/>
78+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/semphr.h"/>
79+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/StackMacros.h"/>
80+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/stack_macros.h"/>
81+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/stream_buffer.h"/>
82+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/task.h"/>
83+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/include/timers.h"/>
84+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/GCC/ATmega4809/port.c"/>
85+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/GCC/ATmega4809/portmacro.h"/>
86+
<file category="source" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/MemMang/heap.c"/>
87+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/MemMang/heap_1.h"/>
88+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/MemMang/heap_2.h"/>
89+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/MemMang/heap_3.h"/>
90+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/MemMang/heap_4.h"/>
91+
<file category="header" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/MemMang/heap_5.h"/>
92+
<file category="source" condition="ARMCC, GCC, IAR" name="OLED/font.c"/>
93+
<file category="header" condition="ARMCC, GCC, IAR" name="OLED/font.h"/>
94+
<file category="source" condition="ARMCC, GCC, IAR" name="OLED/oled.c"/>
95+
<file category="header" condition="ARMCC, GCC, IAR" name="OLED/oled.h"/>
96+
<file category="header" condition="ARMCC, GCC, IAR" name="OLED/oled_pins.h"/>
97+
<file category="source" condition="ARMCC, GCC, IAR" name="OLED/ssd1306.c"/>
98+
<file category="header" condition="ARMCC, GCC, IAR" name="OLED/ssd1306.h"/>
99+
<file category="other" condition="ARMCC, GCC, IAR" name="documentation/my_project.rst/"/>
100+
<file category="source" condition="ARMCC, GCC, IAR" name="src/driver_init.c"/>
101+
<file category="header" condition="ARMCC, GCC, IAR" name="include/driver_init.h"/>
102+
<file category="header" condition="ARMCC, GCC, IAR" name="include/atmel_start_pins.h"/>
103+
<file category="source" condition="ARMCC, GCC, IAR" name="driver_isr.c"/>
104+
<file category="other" condition="ARMCC, GCC, IAR" name="doxygen/mainpage.dox"/>
105+
<file category="other" condition="ARMCC, GCC, IAR" name="doxygen/generator/doxyfile.doxygen"/>
106+
<file category="other" condition="ARMCC, GCC, IAR" name="doxygen/generator/DoxygenLayout.xml"/>
107+
<file category="other" condition="ARMCC, GCC, IAR" name="doxygen/system.dox"/>
108+
<file category="header" condition="ARMCC, GCC, IAR" name="include/bod.h"/>
109+
<file category="header" condition="ARMCC, GCC, IAR" name="include/ccp.h"/>
110+
<file category="header" condition="ARMCC, GCC, IAR" name="include/clkctrl.h"/>
111+
<file category="header" condition="ARMCC, GCC, IAR" name="include/cpuint.h"/>
112+
<file category="header" condition="ARMCC, GCC, IAR" name="include/port.h"/>
113+
<file category="header" condition="ARMCC, GCC, IAR" name="include/protected_io.h"/>
114+
<file category="header" condition="ARMCC, GCC, IAR" name="include/rstctrl.h"/>
115+
<file category="header" condition="ARMCC, GCC, IAR" name="include/slpctrl.h"/>
116+
<file category="header" condition="ARMCC, GCC, IAR" name="include/system.h"/>
117+
<file category="source" condition="ARMCC, GCC, IAR" name="src/bod.c"/>
118+
<file category="source" condition="ARMCC, GCC, IAR" name="src/clkctrl.c"/>
119+
<file category="source" condition="ARMCC, GCC, IAR" name="src/cpuint.c"/>
120+
<file category="source" condition="ARMCC, GCC, IAR" name="src/protected_io.S"/>
121+
<file category="source" condition="ARMCC, GCC, IAR" name="src/slpctrl.c"/>
122+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/assembler.h"/>
123+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/assembler/gas.h"/>
124+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/assembler/iar.h"/>
125+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/atomic.h"/>
126+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/compiler.h"/>
127+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/interrupt_avr8.h"/>
128+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/utils.h"/>
129+
<file category="header" condition="ARMCC, GCC, IAR" name="utils/utils_assert.h"/>
130+
<file category="header" condition="ARMCC, GCC, IAR" name="atmel_start.h"/>
131+
<file category="source" condition="ARMCC, GCC, IAR" name="atmel_start.c"/>
132+
<file attr="config" category="header" condition="ARMCC, GCC, IAR" name="config/clock_config.h"/>
133+
<file category="include" condition="ARMCC, GCC, IAR" name="config"/>
134+
<file category="include" condition="ARMCC, GCC, IAR" name="include"/>
135+
<file category="include" condition="ARMCC, GCC, IAR" name="utils"/>
136+
<file category="include" condition="ARMCC, GCC, IAR" name="utils/assembler"/>
137+
<file category="include" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/MemMang"/>
138+
<file category="include" condition="ARMCC, GCC, IAR" name="OLED"/>
139+
<file category="include" condition="ARMCC, GCC, IAR" name="freeRTOS/portable/GCC/ATmega4809"/>
140+
<file category="include" condition="ARMCC, GCC, IAR" name="freeRTOS/include"/>
141+
<file category="include" condition="ARMCC, GCC, IAR" name=""/>
142+
</files>
143+
</component>
144+
</components>
145+
</package>
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
* FreeRTOS Kernel V10.0.0
3+
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software. If you wish to use our Amazon
14+
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
*
23+
* http://www.FreeRTOS.org
24+
* http://aws.amazon.com/freertos
25+
*
26+
* 1 tab == 4 spaces!
27+
*/
28+
29+
#ifndef FREERTOS_CONFIG_H
30+
#define FREERTOS_CONFIG_H
31+
32+
/*
33+
* #define TCB_t to avoid conflicts between the
34+
* FreeRTOS task control block type (TCB_t) and the
35+
* AVR Timer Counter B type (TCB_t)
36+
*/
37+
#define TCB_t avrTCB_t
38+
#include <avr/io.h>
39+
#undef TCB_t
40+
41+
#define configUSE_PREEMPTION 1
42+
#define configCPU_CLOCK_HZ (20e6 / 2)
43+
#define configTICK_RATE_HZ 1000
44+
#define configMAX_PRIORITIES 4
45+
#define configMINIMAL_STACK_SIZE 115
46+
#define configMAX_TASK_NAME_LEN 8
47+
#define configUSE_16_BIT_TICKS 1
48+
#define configIDLE_SHOULD_YIELD 1
49+
#define configUSE_TASK_NOTIFICATIONS 1
50+
#define configUSE_MUTEXES 1
51+
#define configUSE_RECURSIVE_MUTEXES 0
52+
#define configUSE_COUNTING_SEMAPHORES 0
53+
#define configQUEUE_REGISTRY_SIZE 0
54+
#define configUSE_QUEUE_SETS 0
55+
#define configUSE_TIME_SLICING 1
56+
#define configUSE_NEWLIB_REENTRANT 0
57+
#define configENABLE_BACKWARD_COMPATIBILITY 0
58+
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
59+
60+
/* Memory allocation related definitions. */
61+
#define configSUPPORT_STATIC_ALLOCATION 0
62+
#define configSUPPORT_DYNAMIC_ALLOCATION 1
63+
#define configTOTAL_HEAP_SIZE 0x800
64+
#define configAPPLICATION_ALLOCATED_HEAP 0
65+
66+
/* Hook function related definitions. */
67+
#define configUSE_IDLE_HOOK 0
68+
#define configUSE_TICK_HOOK 0
69+
#define configCHECK_FOR_STACK_OVERFLOW 0
70+
#define configUSE_MALLOC_FAILED_HOOK 0
71+
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
72+
73+
/* Run time and task stats gathering related definitions. */
74+
#define configGENERATE_RUN_TIME_STATS 0
75+
#define configUSE_TRACE_FACILITY 0
76+
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
77+
78+
/* Co-routine related definitions. */
79+
#define configUSE_CO_ROUTINES 0
80+
#define configMAX_CO_ROUTINE_PRIORITIES 1
81+
82+
/* Software timer related definitions. */
83+
#define configUSE_TIMERS 0
84+
#define configTIMER_TASK_PRIORITY 3
85+
#define configTIMER_QUEUE_LENGTH 10
86+
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
87+
88+
/* Define to trap errors during development. */
89+
//#define configASSERT( x ) if( ( x ) == 0 ) { asm volatile ("cli"); while(1){ asm volatile ("BREAK"); } }
90+
91+
/* Optional functions - most linkers will remove unused functions anyway. */
92+
#define INCLUDE_vTaskPrioritySet 0
93+
#define INCLUDE_uxTaskPriorityGet 0
94+
#define INCLUDE_vTaskDelete 0
95+
#define INCLUDE_vTaskSuspend 1
96+
#define INCLUDE_xResumeFromISR 0
97+
#define INCLUDE_vTaskDelayUntil 1
98+
#define INCLUDE_vTaskDelay 1
99+
#define INCLUDE_xTaskGetSchedulerState 0
100+
#define INCLUDE_xTaskGetCurrentTaskHandle 0
101+
#define INCLUDE_uxTaskGetStackHighWaterMark 0
102+
#define INCLUDE_xTaskGetIdleTaskHandle 0
103+
#define INCLUDE_eTaskGetState 0
104+
#define INCLUDE_xEventGroupSetBitFromISR 0
105+
#define INCLUDE_xTimerPendFunctionCall 0
106+
#define INCLUDE_xTaskAbortDelay 0
107+
#define INCLUDE_xTaskGetHandle 0
108+
#define INCLUDE_xTaskResumeFromISR 0
109+
110+
#define pdMS_TO_TICKS(xTimeInMs) ((TickType_t)(((uint32_t)(xTimeInMs) * (uint32_t)configTICK_RATE_HZ) / (uint32_t)1000))
111+
112+
#endif /* FREERTOS_CONFIG_H */

ATmega4809FreeRTOSExample.X/LED.c

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*
2+
(C) 2018 Microchip Technology Inc. and its subsidiaries.
3+
4+
Subject to your compliance with these terms, you may use Microchip software and
5+
any derivatives exclusively with Microchip products. It is your responsibility
6+
to comply with third party license terms applicable to your use of third party
7+
software (including open source software) that may accompany Microchip software.
8+
9+
THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS,
10+
IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES
11+
OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
12+
IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
13+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER
14+
RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF
15+
THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED
16+
BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS
17+
SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY
18+
TO MICROCHIP FOR THIS SOFTWARE.
19+
*/
20+
21+
#include <avr/io.h>
22+
#include <stdbool.h>
23+
24+
#include "FreeRTOS.h"
25+
#include "task.h"
26+
#include "queue.h"
27+
28+
#include "LED.h"
29+
30+
/* Private Data Types */
31+
typedef struct {
32+
PORT_t *port;
33+
uint8_t pin;
34+
} led_t;
35+
36+
/* Private Data */
37+
static const led_t LEDs[] = {
38+
{.port = &PORTF, .pin = PIN5_bm},
39+
{.port = &PORTD, .pin = PIN4_bm},
40+
{.port = &PORTD, .pin = PIN5_bm},
41+
{.port = &PORTC, .pin = PIN5_bm},
42+
};
43+
static const uint8_t num_LEDs = sizeof(LEDs) / sizeof(led_t);
44+
45+
/* Private Function Declarations */
46+
static void LED_on(uint8_t LED);
47+
static void LED_off(uint8_t LED);
48+
static void LED_toggle(uint8_t LED);
49+
static void LED_set_state(uint8_t LED, bool state);
50+
51+
/* Global Function */
52+
void tsk_LED(void *pvParams)
53+
{
54+
LED_request_t LED_request;
55+
while (xQueueReceive(led_queue, &LED_request, portMAX_DELAY)) {
56+
if (LED_request.LED == 0) {
57+
continue;
58+
}
59+
60+
LED_set_state(LED_request.LED, LED_request.state);
61+
}
62+
}
63+
64+
void tsk_status_LED(void *pvParams)
65+
{
66+
while (1) {
67+
LED_toggle(0);
68+
vTaskDelay(pdMS_TO_TICKS(250));
69+
}
70+
}
71+
72+
void LEDs_init(void)
73+
{
74+
for (uint8_t LED = 0; LED < num_LEDs; LED++) {
75+
led_t this_led = LEDs[LED];
76+
LED_off(LED);
77+
this_led.port->DIRSET = this_led.pin;
78+
}
79+
}
80+
81+
/* Private Methods */
82+
static void LED_on(uint8_t LED)
83+
{
84+
led_t this_led = LEDs[LED];
85+
this_led.port->OUTCLR = this_led.pin;
86+
}
87+
88+
static void LED_off(uint8_t LED)
89+
{
90+
led_t this_led = LEDs[LED];
91+
this_led.port->OUTSET = this_led.pin;
92+
}
93+
94+
static void LED_toggle(uint8_t LED)
95+
{
96+
led_t this_led = LEDs[LED];
97+
this_led.port->OUTTGL = this_led.pin;
98+
}
99+
100+
static void LED_set_state(uint8_t LED, bool state)
101+
{
102+
state ? LED_on(LED) : LED_off(LED);
103+
}

0 commit comments

Comments
 (0)