| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | /* | ||
| 3 | * This file is part of the Falcon Player (FPP) and is Copyright (C) | ||
| 4 | * 2013-2022 by the Falcon Player Developers. | ||
| 5 | * | ||
| 6 | * The Falcon Player (FPP) is free software, and is covered under | ||
| 7 | * multiple Open Source licenses. Please see the included 'LICENSES' | ||
| 8 | * file for descriptions of what files are covered by each license. | ||
| 9 | * | ||
| 10 | * This source file is covered under the LGPL v2.1 as described in the | ||
| 11 | * included LICENSE.LGPL file. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <stdint.h> | ||
| 15 | |||
| 16 | class SPIUtils { | ||
| 17 | public: | ||
| 18 | SPIUtils(int channel, int baud); | ||
| 19 | ~SPIUtils(); | ||
| 20 | |||
| 21 | int xfer(uint8_t* tx, uint8_t* rx, int count); | ||
| 22 | |||
| 23 | 68 | bool isOk() { return file != -1; } | |
| 24 | |||
| 25 | private: | ||
| 26 | int file; | ||
| 27 | int channel; | ||
| 28 | int speed; | ||
| 29 | int bitsPerWord; | ||
| 30 | }; | ||
| 31 |