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

Improvement of enums in some cases. Now it is coded that they must oc…#167

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

Open
KOLANICH wants to merge1 commit intoarduino:master
base:master
Choose a base branch
Loading
fromKOLANICH-libs:enum_improvement
Open
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
12 changes: 9 additions & 3 deletionsapi/Common.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,25 +6,31 @@
extern "C"{
#endif

#ifdef __cplusplus
#define ARD_CHAR_ENUM_XWEZPiBoACuGnH : char
#else
#define ARD_CHAR_ENUM_XWEZPiBoACuGnH __attribute__ ((__packed__))
#endif

void yield(void);

typedef enum {
typedef enumARD_CHAR_ENUM_XWEZPiBoACuGnH{
LOW = 0,
HIGH = 1,
CHANGE = 2,
FALLING = 3,
RISING = 4,
} PinStatus;

typedef enum {
typedef enumARD_CHAR_ENUM_XWEZPiBoACuGnH{
INPUT = 0x0,
OUTPUT = 0x1,
INPUT_PULLUP = 0x2,
INPUT_PULLDOWN = 0x3,
OUTPUT_OPENDRAIN = 0x4,
} PinMode;

typedef enum {
typedef enumARD_CHAR_ENUM_XWEZPiBoACuGnH{
LSBFIRST = 0,
MSBFIRST = 1,
} BitOrder;
Expand Down
2 changes: 1 addition & 1 deletionapi/HardwareSPI.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,7 @@

namespace arduino {

typedef enum {
typedef enumARD_CHAR_ENUM_XWEZPiBoACuGnH{
SPI_MODE0 = 0,
SPI_MODE1 = 1,
SPI_MODE2 = 2,
Expand Down
4 changes: 2 additions & 2 deletionsapi/Stream.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,7 @@ namespace arduino {
// This enumeration provides the lookahead options for parseInt(), parseFloat()
// The rules set out here are used until either the first valid character is found
// or a time out occurs due to lack of input.
enum LookaheadMode{
enum LookaheadMode: uint8_t{
SKIP_ALL, // All invalid characters are ignored.
SKIP_NONE, // Nothing is skipped, and the stream is not touched unless the first waiting character is valid.
SKIP_WHITESPACE // Only tabs, spaces, line feeds & carriage returns are skipped.
Expand DownExpand Up@@ -130,4 +130,4 @@ class Stream : public Print

}

using arduino::Stream;
using arduino::Stream;

[8]ページ先頭

©2009-2025 Movatter.jp