Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
inc/boards.h@25:8bcc8bea0e31, 2019-01-20 (annotated)
- Committer:
- mfwic
- Date:
- Sun Jan 20 16:56:52 2019 +0000
- Revision:
- 25:8bcc8bea0e31
- Parent:
- 15:aed8f326c949
- Child:
- 30:d8721a46ee03
Added multiple LUTs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mfwic | 0:44a3005d4f20 | 1 | //------------------------------------------------------------------------------- |
mfwic | 0:44a3005d4f20 | 2 | // |
mfwic | 0:44a3005d4f20 | 3 | // Treehouse Designs Inc. |
mfwic | 0:44a3005d4f20 | 4 | // Colorado Springs, Colorado |
mfwic | 0:44a3005d4f20 | 5 | // |
mfwic | 0:44a3005d4f20 | 6 | // Copyright (c) 2016 by Treehouse Designs Inc. |
mfwic | 0:44a3005d4f20 | 7 | // Copyright (c) 2018 by Agility Power Systems Inc. |
mfwic | 0:44a3005d4f20 | 8 | // |
mfwic | 0:44a3005d4f20 | 9 | // This code is the property of Treehouse Designs, Inc. (Treehouse) and |
mfwic | 0:44a3005d4f20 | 10 | // Agility Power Systems Inc. (Agility) and may not be redistributed |
mfwic | 0:44a3005d4f20 | 11 | // in any form without prior written permission from |
mfwic | 0:44a3005d4f20 | 12 | // both copyright holders, Treehouse and Agility. |
mfwic | 0:44a3005d4f20 | 13 | // |
mfwic | 0:44a3005d4f20 | 14 | // The above copyright notice and this permission notice shall be included in |
mfwic | 0:44a3005d4f20 | 15 | // all copies or substantial portions of the Software. |
mfwic | 0:44a3005d4f20 | 16 | // |
mfwic | 0:44a3005d4f20 | 17 | // |
mfwic | 0:44a3005d4f20 | 18 | //------------------------------------------------------------------------------- |
mfwic | 0:44a3005d4f20 | 19 | // |
mfwic | 0:44a3005d4f20 | 20 | // REVISION HISTORY: |
mfwic | 0:44a3005d4f20 | 21 | // |
mfwic | 0:44a3005d4f20 | 22 | // $Author: $ |
mfwic | 0:44a3005d4f20 | 23 | // $Rev: $ |
mfwic | 0:44a3005d4f20 | 24 | // $Date: $ |
mfwic | 0:44a3005d4f20 | 25 | // $URL: $ |
mfwic | 0:44a3005d4f20 | 26 | // |
mfwic | 0:44a3005d4f20 | 27 | //------------------------------------------------------------------------------- |
mfwic | 0:44a3005d4f20 | 28 | |
mfwic | 0:44a3005d4f20 | 29 | #ifndef BOARDS_H |
mfwic | 0:44a3005d4f20 | 30 | #define BOARDS_H |
mfwic | 0:44a3005d4f20 | 31 | |
mfwic | 15:aed8f326c949 | 32 | #include "adc_defs.h" |
mfwic | 15:aed8f326c949 | 33 | |
mfwic | 15:aed8f326c949 | 34 | #define VOLTAGE_TOLERANCE 0.1 |
mfwic | 15:aed8f326c949 | 35 | const unsigned int V48_HI = (unsigned int)ADC_SCALE_FACTOR*(VOLTAGE_48_ACTUAL_VALUE/VOLTAGE_TARG_VALUE)*(1.0+VOLTAGE_TOLERANCE); |
mfwic | 15:aed8f326c949 | 36 | const unsigned int V48_LO = (unsigned int)ADC_SCALE_FACTOR*(VOLTAGE_48_ACTUAL_VALUE/VOLTAGE_TARG_VALUE)*(1.0-VOLTAGE_TOLERANCE); |
mfwic | 15:aed8f326c949 | 37 | const unsigned int V24_HI = (unsigned int)ADC_SCALE_FACTOR*(VOLTAGE_24_ACTUAL_VALUE/VOLTAGE_TARG_VALUE)*(1.0+VOLTAGE_TOLERANCE); |
mfwic | 15:aed8f326c949 | 38 | const unsigned int V24_LO = (unsigned int)ADC_SCALE_FACTOR*(VOLTAGE_24_ACTUAL_VALUE/VOLTAGE_TARG_VALUE)*(1.0-VOLTAGE_TOLERANCE); |
mfwic | 15:aed8f326c949 | 39 | const unsigned int V12_HI = (unsigned int)ADC_SCALE_FACTOR*(VOLTAGE_12_ACTUAL_VALUE/VOLTAGE_TARG_VALUE)*(1.0+VOLTAGE_TOLERANCE); |
mfwic | 15:aed8f326c949 | 40 | const unsigned int V12_LO = (unsigned int)ADC_SCALE_FACTOR*(VOLTAGE_12_ACTUAL_VALUE/VOLTAGE_TARG_VALUE)*(1.0-VOLTAGE_TOLERANCE); |
mfwic | 15:aed8f326c949 | 41 | |
mfwic | 15:aed8f326c949 | 42 | void initBoards(struct adcValues); |
mfwic | 15:aed8f326c949 | 43 | |
mfwic | 15:aed8f326c949 | 44 | extern bool buck; |
mfwic | 0:44a3005d4f20 | 45 | |
mfwic | 0:44a3005d4f20 | 46 | extern unsigned int boardEnableBits; |
mfwic | 1:9f8583ba2431 | 47 | extern unsigned int boardsActive; |
mfwic | 0:44a3005d4f20 | 48 | |
mfwic | 6:39442d493098 | 49 | extern unsigned int en_out_code; |
mfwic | 6:39442d493098 | 50 | extern unsigned int wr_out_code; |
mfwic | 0:44a3005d4f20 | 51 | |
mfwic | 25:8bcc8bea0e31 | 52 | //extern unsigned int bCodeArray[][]; |
mfwic | 25:8bcc8bea0e31 | 53 | extern unsigned int bCodeRow[]; |
mfwic | 25:8bcc8bea0e31 | 54 | |
mfwic | 25:8bcc8bea0e31 | 55 | void setBoardControls(unsigned int); |
mfwic | 15:aed8f326c949 | 56 | unsigned int setBoardEnables(unsigned int); |
mfwic | 15:aed8f326c949 | 57 | unsigned int setBoardWeights(unsigned int); |
mfwic | 0:44a3005d4f20 | 58 | |
mfwic | 15:aed8f326c949 | 59 | int checkRange(int, int, int); |
mfwic | 1:9f8583ba2431 | 60 | |
mfwic | 1:9f8583ba2431 | 61 | void toggleLatchSignal(void); |
mfwic | 1:9f8583ba2431 | 62 | |
mfwic | 15:aed8f326c949 | 63 | void startConverter(unsigned int); |
mfwic | 4:db38665c3727 | 64 | void stopConverter(void); |
mfwic | 4:db38665c3727 | 65 | |
mfwic | 15:aed8f326c949 | 66 | struct statusValues checkLevels(struct adcValues); |
mfwic | 6:39442d493098 | 67 | void updateControls(unsigned short); |
mfwic | 15:aed8f326c949 | 68 | void XupdateControls(unsigned short); |
mfwic | 4:db38665c3727 | 69 | |
mfwic | 0:44a3005d4f20 | 70 | #endif |