embedded smtf7 based scope
Dependencies: BSP_DISCO_F746NG_patch_fixed mbed
Interface.h@0:0babd18ae684, 2015-11-18 (annotated)
- Committer:
- the_sz
- Date:
- Wed Nov 18 14:31:49 2015 +0000
- Revision:
- 0:0babd18ae684
1.01
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
the_sz | 0:0babd18ae684 | 1 | #ifndef __Interface_h |
the_sz | 0:0babd18ae684 | 2 | #define __Interface_h |
the_sz | 0:0babd18ae684 | 3 | |
the_sz | 0:0babd18ae684 | 4 | #pragma pack(1) |
the_sz | 0:0babd18ae684 | 5 | |
the_sz | 0:0babd18ae684 | 6 | #define BUFFER_SIZE 1000 // number of samples per HT_DATA report |
the_sz | 0:0babd18ae684 | 7 | |
the_sz | 0:0babd18ae684 | 8 | #define CHANNEL_COUNT 2 |
the_sz | 0:0babd18ae684 | 9 | #define HEADER_MAGIC 0x53636F70 // 'Scop' |
the_sz | 0:0babd18ae684 | 10 | |
the_sz | 0:0babd18ae684 | 11 | typedef enum |
the_sz | 0:0babd18ae684 | 12 | { |
the_sz | 0:0babd18ae684 | 13 | HT_NONE, |
the_sz | 0:0babd18ae684 | 14 | HT_DATA, |
the_sz | 0:0babd18ae684 | 15 | HT_INFO_REQUEST, |
the_sz | 0:0babd18ae684 | 16 | HT_INFO_RESPONSE, |
the_sz | 0:0babd18ae684 | 17 | HT_CAPTURE_START, |
the_sz | 0:0babd18ae684 | 18 | |
the_sz | 0:0babd18ae684 | 19 | } HEADER_TYPE_ENUM; |
the_sz | 0:0babd18ae684 | 20 | |
the_sz | 0:0babd18ae684 | 21 | typedef struct |
the_sz | 0:0babd18ae684 | 22 | { |
the_sz | 0:0babd18ae684 | 23 | float values[CHANNEL_COUNT]; |
the_sz | 0:0babd18ae684 | 24 | |
the_sz | 0:0babd18ae684 | 25 | } VALUES_STRUCT; |
the_sz | 0:0babd18ae684 | 26 | |
the_sz | 0:0babd18ae684 | 27 | typedef struct |
the_sz | 0:0babd18ae684 | 28 | { |
the_sz | 0:0babd18ae684 | 29 | uint32_t magic; |
the_sz | 0:0babd18ae684 | 30 | uint8_t type; |
the_sz | 0:0babd18ae684 | 31 | uint32_t length; // length in bytes of following data |
the_sz | 0:0babd18ae684 | 32 | |
the_sz | 0:0babd18ae684 | 33 | } HEADER_STRUCT; |
the_sz | 0:0babd18ae684 | 34 | |
the_sz | 0:0babd18ae684 | 35 | typedef struct |
the_sz | 0:0babd18ae684 | 36 | { |
the_sz | 0:0babd18ae684 | 37 | uint8_t versionMajor; |
the_sz | 0:0babd18ae684 | 38 | uint8_t versionMinor; |
the_sz | 0:0babd18ae684 | 39 | char name[20]; |
the_sz | 0:0babd18ae684 | 40 | |
the_sz | 0:0babd18ae684 | 41 | } INTERFACE_INFO_RESPONSE_STRUCT; |
the_sz | 0:0babd18ae684 | 42 | |
the_sz | 0:0babd18ae684 | 43 | typedef enum |
the_sz | 0:0babd18ae684 | 44 | { |
the_sz | 0:0babd18ae684 | 45 | TM_NONE =0x00, |
the_sz | 0:0babd18ae684 | 46 | TM_RAISING =0x01, |
the_sz | 0:0babd18ae684 | 47 | TM_FALLING =0x02, |
the_sz | 0:0babd18ae684 | 48 | TM_AUTO =0x04, |
the_sz | 0:0babd18ae684 | 49 | |
the_sz | 0:0babd18ae684 | 50 | } TRIGGER_MODE_ENUM; |
the_sz | 0:0babd18ae684 | 51 | |
the_sz | 0:0babd18ae684 | 52 | typedef struct |
the_sz | 0:0babd18ae684 | 53 | { |
the_sz | 0:0babd18ae684 | 54 | float triggerLevel; |
the_sz | 0:0babd18ae684 | 55 | uint8_t triggerMode; |
the_sz | 0:0babd18ae684 | 56 | uint16_t delay; // in usec |
the_sz | 0:0babd18ae684 | 57 | |
the_sz | 0:0babd18ae684 | 58 | } INTERFACE_CAPTURE_START_STRUCT; |
the_sz | 0:0babd18ae684 | 59 | |
the_sz | 0:0babd18ae684 | 60 | #pragma pack() |
the_sz | 0:0babd18ae684 | 61 | |
the_sz | 0:0babd18ae684 | 62 | #endif |