Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make enums #2

Open
gorkemcaylak opened this issue Mar 2, 2021 · 0 comments
Open

Make enums #2

gorkemcaylak opened this issue Mar 2, 2021 · 0 comments

Comments

@gorkemcaylak
Copy link
Contributor

It is better practice to have these defined as enums in the header file similar to this:

enum Commands {
CHECK_STATUS = 0,
TAKE_PICTURE = 1,
...
}

/* Commands that can be tested */
static const unit8_t CHECK_STATUS = 0x00;
static const unit8_t TAKE_PICTURE = 0x01;
static const unit8_t GET_THUMBNAIL_SIZE = 0x02;
static const unit8_t GET_PICTURE_SIZE = 0x03;
static const unit8_t GET_THUMBNAIL = 0x04;
static const unit8_t GET_PICTURE = 0x05;
static const unit8_t SET_CONTRAST = 0x06;
static const unit8_t SET_BRIGTHNESS = 0x07;
static const unit8_t SET_EXPOSURE = 0x08;
static const unit8_t SET_SLEEP_TIME = 0x09;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant