Archived
Template
1
0

initial commit

This commit is contained in:
2023-07-11 12:27:35 +02:00
commit b0e3d721e0
28 changed files with 2919 additions and 0 deletions

110
src/board/led.c Normal file
View File

@@ -0,0 +1,110 @@
/*
* Model: XFT.qm
* File: ${.::board::led.c}
*
* This code has been generated by QM 5.2.5 <www.state-machine.com/qm>.
* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* This generated code is open source software: you can redistribute it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation.
*
* This code 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.
*
* NOTE:
* Alternatively, this generated code may be distributed under the terms
* of Quantum Leaps commercial licenses, which expressly supersede the GNU
* General Public License and are specifically designed for licensees
* interested in retaining the proprietary status of their code.
*
* Contact information:
* <www.state-machine.com/licensing>
* <info@state-machine.com>
*/
#include "led.h"
#include "../mcc_generated_files/pin_manager.h"
void LED_init(LED * const me,
uint8_t id)
{
me->id = id;
}
void LED_initHW(LED * const me) {
LED_off(me);
}
void LED_on(LED * const me) {
LED* l = (LED*) me;
switch (l->id) {
case 1:
OUTPUT1_SetHigh();
break;
case 2:
OUTPUT2_SetHigh();
break;
case 3:
OUTPUT3_SetHigh();
break;
case 4:
OUTPUT4_SetHigh();
break;
case 5:
OUTPUT5_SetHigh();
break;
case 6:
OUTPUT6_SetHigh();
break;
case 7:
OUTPUT7_SetHigh();
break;
case 8:
OUTPUT8_SetHigh();
break;
case 9:
OUTPUT9_SetHigh();
break;
case 10:
OUTPUT10_SetHigh();
break;
}
}
void LED_off(LED * const me) {
LED* l = (LED*) me;
switch (l->id) {
case 1:
OUTPUT1_SetLow();
break;
case 2:
OUTPUT2_SetLow();
break;
case 3:
OUTPUT3_SetLow();
break;
case 4:
OUTPUT4_SetLow();
break;
case 5:
OUTPUT5_SetLow();
break;
case 6:
OUTPUT6_SetLow();
break;
case 7:
OUTPUT7_SetLow();
break;
case 8:
OUTPUT8_SetLow();
break;
case 9:
OUTPUT9_SetLow();
break;
case 10:
OUTPUT10_SetLow();
break;
}
}