-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove duplicate unit tests from libopeninv (#47) As libopeninv now has unit tests remove the duplicates. Update the Makefile and Code::Blocks project to reference the new libopeninv tests and add missing files. Update the GitHub Action workflow to run both sets of tests. * Add MG setup and files --------- Co-authored-by: David J. Fiddes <[email protected]>
- Loading branch information
1 parent
1b43e4c
commit 5284de6
Showing
15 changed files
with
476 additions
and
918 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This file is part of the stm32-sine project. | ||
* | ||
* Copyright (C) 2011 Johannes Huebner <[email protected]> | ||
* Copyright (C) 2019 Nail Guzel | ||
* | ||
* This program 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. | ||
* | ||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Simplified library for interfacing with the NXP GD3100 gate drivers | ||
* found on the MG inverter platform. | ||
*/ | ||
|
||
#include "stddef.h" | ||
#include "stdbool.h" | ||
#include <stdint.h> | ||
#include "delay.h" | ||
|
||
#define REQ_ADC_EXT 0x4001 | ||
#define REQ_STAT1 0x2800 | ||
#define REQ_STAT2 0x3000 | ||
#define REQ_STAT3 0x3800 | ||
|
||
/// SPI channels | ||
enum SpiChannelMG | ||
{ | ||
MGSPI1_H = 1, | ||
MGSPI2_H = 2, | ||
MGSPI3_H = 3, | ||
MGSPI1_L = 4, | ||
MGSPI2_L = 5, | ||
MGSPI3_L = 6, | ||
}; | ||
|
||
extern uint32_t Send16 (enum SpiChannelMG channel,uint16_t txData16); | ||
extern uint32_t Config_MG (enum SpiChannelMG channel); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule libopeninv
updated
25 files
+37 −0 | .github/workflows/CI-build.yml | |
+2 −0 | .gitignore | |
+3 −0 | README.md | |
+3 −3 | include/canhardware.h | |
+7 −2 | include/canmap.h | |
+2 −2 | include/canobd2.h | |
+1 −1 | include/cansdo.h | |
+1 −1 | include/picontroller.h | |
+6 −5 | src/canhardware.cpp | |
+53 −24 | src/canmap.cpp | |
+1 −3 | src/canobd2.cpp | |
+2 −5 | src/cansdo.cpp | |
+2 −2 | src/picontroller.cpp | |
+1 −1 | src/stm32_can.cpp | |
+34 −0 | test/Makefile | |
+45 −0 | test/stub_canhardware.cpp | |
+48 −0 | test/stub_canhardware.h | |
+58 −0 | test/stub_libopencm3.c | |
+28 −0 | test/test-include/hwdefs.h | |
+27 −0 | test/test-include/param_prj.h | |
+36 −0 | test/test.h | |
+1,140 −0 | test/test_canmap.cpp | |
+68 −0 | test/test_fp.cpp | |
+75 −0 | test/test_fu.cpp | |
+61 −0 | test/test_main.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.