La Suno / Mbed 2 deprecated afero_poc15_180403R

Dependencies:   UniGraphic mbed vt100

Committer:
Rhyme
Date:
Tue Apr 24 08:58:33 2018 +0000
Revision:
0:0b6732b53bf4
Temporary Connector Reversed Version

Who changed what in which revision?

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