Gas Pressure Display Updated Power control for Pressure sensor added

Dependencies:   UniGraphic mbed vt100

Committer:
Rhyme
Date:
Fri Feb 16 08:27:50 2018 +0000
Revision:
0:37c8ecde13c2
control PSE530 power via PTC5 (pse530_en)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhyme 0:37c8ecde13c2 1 /**
Rhyme 0:37c8ecde13c2 2 * Copyright 2015 Afero, Inc.
Rhyme 0:37c8ecde13c2 3 *
Rhyme 0:37c8ecde13c2 4 * Licensed under the Apache License, Version 2.0 (the "License");
Rhyme 0:37c8ecde13c2 5 * you may not use this file except in compliance with the License.
Rhyme 0:37c8ecde13c2 6 * You may obtain a copy of the License at
Rhyme 0:37c8ecde13c2 7 *
Rhyme 0:37c8ecde13c2 8 * http://www.apache.org/licenses/LICENSE-2.0
Rhyme 0:37c8ecde13c2 9 *
Rhyme 0:37c8ecde13c2 10 * Unless required by applicable law or agreed to in writing, software
Rhyme 0:37c8ecde13c2 11 * distributed under the License is distributed on an "AS IS" BASIS,
Rhyme 0:37c8ecde13c2 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Rhyme 0:37c8ecde13c2 13 * See the License for the specific language governing permissions and
Rhyme 0:37c8ecde13c2 14 * limitations under the License.
Rhyme 0:37c8ecde13c2 15 */
Rhyme 0:37c8ecde13c2 16
Rhyme 0:37c8ecde13c2 17 #ifndef STATUS_COMMAND_H__
Rhyme 0:37c8ecde13c2 18 #define STATUS_COMMAND_H__
Rhyme 0:37c8ecde13c2 19
Rhyme 0:37c8ecde13c2 20 #include "mbed.h"
Rhyme 0:37c8ecde13c2 21 #include "DebugIO.hpp"
Rhyme 0:37c8ecde13c2 22
Rhyme 0:37c8ecde13c2 23 class StatusCommand {
Rhyme 0:37c8ecde13c2 24 public:
Rhyme 0:37c8ecde13c2 25
Rhyme 0:37c8ecde13c2 26 StatusCommand();
Rhyme 0:37c8ecde13c2 27
Rhyme 0:37c8ecde13c2 28 StatusCommand(uint16_t bytesToSend);
Rhyme 0:37c8ecde13c2 29
Rhyme 0:37c8ecde13c2 30 ~StatusCommand();
Rhyme 0:37c8ecde13c2 31
Rhyme 0:37c8ecde13c2 32 uint16_t getSize();
Rhyme 0:37c8ecde13c2 33
Rhyme 0:37c8ecde13c2 34 uint16_t getBytes(int *bytes);
Rhyme 0:37c8ecde13c2 35
Rhyme 0:37c8ecde13c2 36 uint8_t calcChecksum();
Rhyme 0:37c8ecde13c2 37
Rhyme 0:37c8ecde13c2 38 void setChecksum(uint8_t checksum);
Rhyme 0:37c8ecde13c2 39
Rhyme 0:37c8ecde13c2 40 uint8_t getChecksum();
Rhyme 0:37c8ecde13c2 41
Rhyme 0:37c8ecde13c2 42 void setAck(bool ack);
Rhyme 0:37c8ecde13c2 43
Rhyme 0:37c8ecde13c2 44 void setBytesToSend(uint16_t bytesToSend);
Rhyme 0:37c8ecde13c2 45
Rhyme 0:37c8ecde13c2 46 uint16_t getBytesToSend();
Rhyme 0:37c8ecde13c2 47
Rhyme 0:37c8ecde13c2 48 void setBytesToRecv(uint16_t bytesToRecv);
Rhyme 0:37c8ecde13c2 49
Rhyme 0:37c8ecde13c2 50 uint16_t getBytesToRecv();
Rhyme 0:37c8ecde13c2 51
Rhyme 0:37c8ecde13c2 52 bool equals(StatusCommand *statusCommand);
Rhyme 0:37c8ecde13c2 53
Rhyme 0:37c8ecde13c2 54 bool isValid();
Rhyme 0:37c8ecde13c2 55
Rhyme 0:37c8ecde13c2 56 void dump();
Rhyme 0:37c8ecde13c2 57
Rhyme 0:37c8ecde13c2 58 void dumpBytes();
Rhyme 0:37c8ecde13c2 59
Rhyme 0:37c8ecde13c2 60 private:
Rhyme 0:37c8ecde13c2 61
Rhyme 0:37c8ecde13c2 62 uint8_t _cmd;
Rhyme 0:37c8ecde13c2 63 uint16_t _bytesToSend;
Rhyme 0:37c8ecde13c2 64 uint16_t _bytesToRecv;
Rhyme 0:37c8ecde13c2 65 uint8_t _checksum;
Rhyme 0:37c8ecde13c2 66 };
Rhyme 0:37c8ecde13c2 67
Rhyme 0:37c8ecde13c2 68 #endif // STATUS_COMMAND_H__