default implementation: may be overridden */
| 34 | |
| 35 | /* default implementation: may be overridden */ |
| 36 | size_t Print::write(const uint8_t *buffer, size_t size) |
| 37 | { |
| 38 | // Assume that write always returns 1 for a single character |
| 39 | // we remove some additions and save a few bytes. |
| 40 | // |
| 41 | // Note that Hardware, Software and Basic serial all return 1 |
| 42 | // for character write regardless, so this as a valid assumption |
| 43 | // at least in those cases. |
| 44 | // |
| 45 | // J.Sleeman (sparks@gogo.co.nz) |
| 46 | |
| 47 | for(size_t n = 0; n < size; n++) |
| 48 | { |
| 49 | write(buffer[n]); |
| 50 | } |
| 51 | return size; |
| 52 | |
| 53 | /* |
| 54 | size_t n = 0; |
| 55 | while (size--) { |
| 56 | n += write(*buffer++); |
| 57 | } |
| 58 | return n; |
| 59 | */ |
| 60 | } |
| 61 | |
| 62 | size_t Print::print(const __FlashStringHelper *ifsh) |
| 63 | { |
nothing calls this directly
no outgoing calls
no test coverage detected