blob: 312620ec8b1fdc9119fdcb930afa1ce92f174382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* DueXn.h
*
* Created on: 19 Oct 2016
* Author: David
*/
#ifndef SRC_DUETNG_DUEXN_H_
#define SRC_DUETNG_DUEXN_H_
#include "ecv.h"
#include "Core.h"
enum class ExpansionBoardType : uint8_t
{
none,
DueX0,
DueX2,
DueX5
};
namespace DuetExpansion
{
ExpansionBoardType Init(); // Initialise the device and identify which expansion board is attached
const char* array null GetExpansionBoardName(); // Return the name of the expansion board, or nullptr if no expansion board
void SetPinMode(Pin pin, PinMode mode); // Set the I/O mode of a pin
bool DigitalRead(Pin pin); // Read a pin
void DigitalWrite(Pin pin, bool high); // Write a pin
void AnalogOut(Pin pin, float pwm); // Set the PWM value on this pin
};
#endif /* SRC_DUETNG_DUEXN_H_ */
|