pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT
Dependencies: mbed MMA8451Q USBDevice WakeUp vt100
Fork of afero_node_suntory_2017_06_15 by
afLib/StatusCommand.h@5:9d5c7ee80f3b, 2017-02-28 (annotated)
- Committer:
- wataloh
- Date:
- Tue Feb 28 02:09:06 2017 +0000
- Revision:
- 5:9d5c7ee80f3b
- Parent:
- 0:20bce0dcc921
added watchdog timer for kl25z.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wataloh | 0:20bce0dcc921 | 1 | /** |
wataloh | 0:20bce0dcc921 | 2 | * Copyright 2015 Afero, Inc. |
wataloh | 0:20bce0dcc921 | 3 | * |
wataloh | 0:20bce0dcc921 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
wataloh | 0:20bce0dcc921 | 5 | * you may not use this file except in compliance with the License. |
wataloh | 0:20bce0dcc921 | 6 | * You may obtain a copy of the License at |
wataloh | 0:20bce0dcc921 | 7 | * |
wataloh | 0:20bce0dcc921 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
wataloh | 0:20bce0dcc921 | 9 | * |
wataloh | 0:20bce0dcc921 | 10 | * Unless required by applicable law or agreed to in writing, software |
wataloh | 0:20bce0dcc921 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
wataloh | 0:20bce0dcc921 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
wataloh | 0:20bce0dcc921 | 13 | * See the License for the specific language governing permissions and |
wataloh | 0:20bce0dcc921 | 14 | * limitations under the License. |
wataloh | 0:20bce0dcc921 | 15 | */ |
wataloh | 0:20bce0dcc921 | 16 | |
wataloh | 0:20bce0dcc921 | 17 | #ifndef STATUS_COMMAND_H__ |
wataloh | 0:20bce0dcc921 | 18 | #define STATUS_COMMAND_H__ |
wataloh | 0:20bce0dcc921 | 19 | |
wataloh | 0:20bce0dcc921 | 20 | #include "mbed.h" |
wataloh | 5:9d5c7ee80f3b | 21 | #include "DebugIO.hpp" |
wataloh | 0:20bce0dcc921 | 22 | |
wataloh | 0:20bce0dcc921 | 23 | class StatusCommand { |
wataloh | 0:20bce0dcc921 | 24 | public: |
wataloh | 0:20bce0dcc921 | 25 | |
wataloh | 0:20bce0dcc921 | 26 | StatusCommand(); |
wataloh | 0:20bce0dcc921 | 27 | |
wataloh | 0:20bce0dcc921 | 28 | StatusCommand(uint16_t bytesToSend); |
wataloh | 0:20bce0dcc921 | 29 | |
wataloh | 0:20bce0dcc921 | 30 | ~StatusCommand(); |
wataloh | 0:20bce0dcc921 | 31 | |
wataloh | 0:20bce0dcc921 | 32 | uint16_t getSize(); |
wataloh | 0:20bce0dcc921 | 33 | |
wataloh | 0:20bce0dcc921 | 34 | uint16_t getBytes(int *bytes); |
wataloh | 0:20bce0dcc921 | 35 | |
wataloh | 0:20bce0dcc921 | 36 | uint8_t calcChecksum(); |
wataloh | 0:20bce0dcc921 | 37 | |
wataloh | 0:20bce0dcc921 | 38 | void setChecksum(uint8_t checksum); |
wataloh | 0:20bce0dcc921 | 39 | |
wataloh | 0:20bce0dcc921 | 40 | uint8_t getChecksum(); |
wataloh | 0:20bce0dcc921 | 41 | |
wataloh | 0:20bce0dcc921 | 42 | void setAck(bool ack); |
wataloh | 0:20bce0dcc921 | 43 | |
wataloh | 0:20bce0dcc921 | 44 | void setBytesToSend(uint16_t bytesToSend); |
wataloh | 0:20bce0dcc921 | 45 | |
wataloh | 0:20bce0dcc921 | 46 | uint16_t getBytesToSend(); |
wataloh | 0:20bce0dcc921 | 47 | |
wataloh | 0:20bce0dcc921 | 48 | void setBytesToRecv(uint16_t bytesToRecv); |
wataloh | 0:20bce0dcc921 | 49 | |
wataloh | 0:20bce0dcc921 | 50 | uint16_t getBytesToRecv(); |
wataloh | 0:20bce0dcc921 | 51 | |
wataloh | 0:20bce0dcc921 | 52 | bool equals(StatusCommand *statusCommand); |
wataloh | 0:20bce0dcc921 | 53 | |
wataloh | 0:20bce0dcc921 | 54 | bool isValid(); |
wataloh | 0:20bce0dcc921 | 55 | |
wataloh | 0:20bce0dcc921 | 56 | void dump(); |
wataloh | 0:20bce0dcc921 | 57 | |
wataloh | 0:20bce0dcc921 | 58 | void dumpBytes(); |
wataloh | 0:20bce0dcc921 | 59 | |
wataloh | 0:20bce0dcc921 | 60 | private: |
wataloh | 0:20bce0dcc921 | 61 | |
wataloh | 0:20bce0dcc921 | 62 | uint8_t _cmd; |
wataloh | 0:20bce0dcc921 | 63 | uint16_t _bytesToSend; |
wataloh | 0:20bce0dcc921 | 64 | uint16_t _bytesToRecv; |
wataloh | 0:20bce0dcc921 | 65 | uint8_t _checksum; |
wataloh | 0:20bce0dcc921 | 66 | }; |
wataloh | 0:20bce0dcc921 | 67 | |
wataloh | 0:20bce0dcc921 | 68 | #endif // STATUS_COMMAND_H__ |