FastArduino
v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
mcp3302.h
Go to the documentation of this file.
1
// Copyright 2016-2023 Jean-Francois Poilpret
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
16
21
#ifndef MCP3302_HH
22
#define MCP3302_HH
23
24
#include "
mcp3x0x.h
"
25
26
namespace
devices::mcp3x0x
27
{
31
enum class
MCP3302Channel
: uint16_t
32
{
33
// single-ended input
34
CH0 = 0x0C00,
35
CH1 = 0x0C80,
36
CH2 = 0x0D00,
37
CH3 = 0x0D80,
38
// differential input
39
CH0_CH1 = 0x0800,
40
CH1_CH0 = 0x0880,
41
CH2_CH3 = 0x0900,
42
CH3_CH2 = 0x0980
43
};
44
51
template
<board::DigitalPin CS>
52
using
MCP3302
=
MCP3x0x<CS, MCP3302Channel, 0x1FFF, 0, int16_t>
;
53
}
54
55
#endif
/* MCP3302_HH */
devices::mcp3x0x::MCP3x0x
Generic class to support (almost) any chip of the SPI-based MicroChip ADC chips family (MCP3001-2-4-8...
Definition:
mcp3x0x.h:70
mcp3x0x.h
API to handle SPI-based MicroChip ADC chips family (MCP3001-2-4-8, MCP3201-2-4-8, MCP3301-2-4).
devices::mcp3x0x
Defines the API for MicroChip ADC chips family support.
Definition:
mcp3001.h:27
devices::mcp3x0x::MCP3302Channel
MCP3302Channel
List of channels supported by MCP3302.
Definition:
mcp3302.h:32
fastarduino
devices
mcp3302.h
Generated by
1.9.5