Skip to content

change analog reference options from enum to #define constants #4759

@WestfW

Description

@WestfW

Currently, on platforms that have multiple choices for source of the analog reference voltage, the possible choices are defined in an enum (this example from Zero):

typedef enum _eAnalogReference
{
  AR_DEFAULT,
  AR_INTERNAL,
  AR_EXTERNAL,
  AR_INTERNAL1V0,
  AR_INTERNAL1V65,
  AR_INTERNAL2V23
} eAnalogReference ;

It has been suggested that this is less useful than #define values, because it can not checked at compile time (in attempts at platform-independent code) with #ifdef

http://forum.arduino.cc/index.php?topic=387409.msg2671892#msg2671892

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreRelated to the code for the standard Arduino APIfeature requestA request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions