-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
target: add initial russian woodpecker port
Signed-off-by: Rafael Silva <perigoso@riseup.net>
- Loading branch information
Showing
5 changed files
with
83 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
INCLUDE sam3u/sam3u2.ld |
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,2 @@ | ||
family = 'sam3u' | ||
has-config = true |
13 changes: 13 additions & 0 deletions
13
src/targets/russian-woodpecker/config/russian-woodpecker.h
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,13 @@ | ||
/* | ||
* SPDX-License-Identifier: MIT | ||
* SPDX-FileCopyrightText: 2021 Rafael Silva <perigoso@riseup.net> | ||
*/ | ||
|
||
/* clang-format off */ | ||
|
||
/* General Config */ | ||
|
||
#define __SAM3U2C__ | ||
|
||
/* Clock Config */ | ||
#define EXTERNAL_CLOCK_VALUE 12000000UL |
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,24 @@ | ||
/* | ||
* SPDX-License-Identifier: MIT | ||
* SPDX-FileCopyrightText: 2022 Rafael Silva <perigoso@riseup.net> | ||
*/ | ||
|
||
#include "util/data.h" | ||
#include "util/types.h" | ||
|
||
#include "platform/sam3u/eefc.h" | ||
#include "platform/sam3u/pmc.h" | ||
#include "platform/sam3u/wdt.h" | ||
|
||
void main() | ||
{ | ||
pmc_init(EXTERNAL_CLOCK_VALUE, 0UL); | ||
pmc_update_clock_tree(); | ||
|
||
wdt_disable(); | ||
|
||
// systick_init(); | ||
|
||
for (;;) { | ||
} | ||
} |
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,42 @@ | ||
/* | ||
* SPDX-License-Identifier: MIT | ||
* SPDX-FileCopyrightText: 2021 Rafael Silva <perigoso@riseup.net> | ||
*/ | ||
|
||
/* Common Configuration */ | ||
|
||
#define CFG_TUSB_MCU OPT_MCU_SAM3U | ||
|
||
#define CFG_TUSB_OS OPT_OS_NONE | ||
|
||
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED) | ||
|
||
/* | ||
* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment. | ||
* Tinyusb use follows macros to declare transferring memory so that they can be put | ||
* into those specific section. | ||
* e.g | ||
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") )) | ||
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4))) | ||
*/ | ||
#ifndef CFG_TUSB_MEM_SECTION | ||
#define CFG_TUSB_MEM_SECTION | ||
#endif | ||
|
||
#ifndef CFG_TUSB_MEM_ALIGN | ||
#define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4))) | ||
#endif | ||
|
||
/* Device Configuration */ | ||
|
||
#define CFG_TUD_ENDPOINT0_SIZE 64 | ||
|
||
/* Class */ | ||
#define CFG_TUD_HID 3 | ||
#define CFG_TUD_CDC 0 | ||
#define CFG_TUD_MSC 0 | ||
#define CFG_TUD_MIDI 0 | ||
#define CFG_TUD_VENDOR 0 | ||
|
||
/* HID buffer size Should be sufficient to hold ID (if any) + Data */ | ||
#define CFG_TUD_HID_BUFSIZE 64 |