Rev 13 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 13 | Rev 14 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | int counter; // byte counter |
9 | int counter; // byte counter |
10 | char complete; // flag complete |
10 | char complete; // flag complete |
11 | char readLines; // true if reading lines with CR at end |
11 | char readLines; // true if reading lines with CR at end |
12 | } editBuffer; |
12 | } editBuffer; |
13 | 13 | ||
- | 14 | /// @brief Use this for the readlines parameter if reading up to buffer length or using CR |
|
- | 15 | static const char READLINES_CR = 1; |
|
- | 16 | /// @brief Use this for the readlines parameter if reading up to buffer length |
|
- | 17 | static const char READLINES_BIN = 0; |
|
- | 18 | ||
14 | /// |
19 | /// |
15 | typedef enum |
20 | typedef enum |
16 | { |
21 | { |
17 | EDIT_NULL = 0, ///< No result |
22 | EDIT_NULL = 0, ///< No result |
18 | EDIT_DONE, ///< All characters read |
23 | EDIT_DONE, ///< All characters read |
Line 35... | Line 40... | ||
35 | /// @brief Poll the line buffer reader |
40 | /// @brief Poll the line buffer reader |
36 | /// @param ctl pointer to a USART control structure |
41 | /// @param ctl pointer to a USART control structure |
37 | /// @param context pointer to the editBuffer context |
42 | /// @param context pointer to the editBuffer context |
38 | /// @return what kind of state the buffer is now in |
43 | /// @return what kind of state the buffer is now in |
39 | extern editBufferReturn readLine(usart_ctl *ctl, editBuffer *context); |
44 | extern editBufferReturn readLine(usart_ctl *ctl, editBuffer *context); |
- | 45 | ||
- | 46 | /// @brief Reset the state of the line buffer reader for the next command |
|
- | 47 | /// @param context editBuffer object to reset |
|
- | 48 | extern void resetInput(editBuffer * context); |
|
- | 49 | ||
- | 50 | ||
- | 51 | /// @brief Return number of characters in context |
|
- | 52 | /// @param context |
|
- | 53 | /// @return number of characters in the context |
|
- | 54 | extern int charCount(editBuffer * context); |