Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

OPTA: allow vid/pid function override from derived core#1026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pennam merged 1 commit intoarduino:mainfrompennam:opta-vid-pid-patch
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletionsvariants/OPTA/pins_arduino.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -148,11 +148,14 @@ static const uint8_t SCK = PIN_SPI_SCK;
// Use these only if bootloader data is not available / valid
#define _BOARD_VENDORID0x2341
#define _BOARD_PRODUCTID0x0264

#ifndef FIRST_PROGRAMMING
uint16_t _getVid_();
uint16_t _getPid_();

// Retrieve (Arduino OUI) Ethernet MAC Address from QSPIF OTP
uint8_t _getSecureEthMac_(uint8_t *);
#endif

#define BOARD_NAME"Arduino Opta"

Expand Down
10 changes: 2 additions & 8 deletionsvariants/OPTA/variant.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -313,26 +313,19 @@ uint16_t boardRevision() {
return (((OptaBoardInfo*)_boardInfo)->revision);
}

#ifndef FIRST_PROGRAMMING
uint16_t _getVid_() {
#ifdef FIRST_PROGRAMMING
return _BOARD_VENDORID;
#else
if (!has_otp_info) {
getSecureFlashData();
}
return ((OptaBoardInfo*)_boardInfo)->vid;
#endif
}

uint16_t _getPid_() {
#ifdef FIRST_PROGRAMMING
return _BOARD_PRODUCTID;
#else
if (!has_otp_info) {
getSecureFlashData();
}
return ((OptaBoardInfo*)_boardInfo)->pid;
#endif
}

uint8_t _getSecureEthMac_(uint8_t *mac_address) {
Expand All@@ -349,6 +342,7 @@ uint8_t mbed_otp_mac_address(char *mac)
auto ret = _getSecureEthMac_(reinterpret_cast<uint8_t *>(mac));
return ret;
}
#endif

#define BOARD_REVISION(x,y) (x << 8 | y)

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp