serial.c/.h: remove serial_writeblock() and ..._P().
Never used, all "blocks" we write are strings.
This commit is contained in:
parent
7c8f1cec87
commit
a1feb32fe3
20
serial.c
20
serial.c
|
|
@ -217,15 +217,6 @@ void serial_writechar(uint8_t data)
|
|||
}
|
||||
#endif /* USB_SERIAL */
|
||||
|
||||
/// send a whole block
|
||||
void serial_writeblock(void *data, int datalen)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < datalen; i++)
|
||||
serial_writechar(((uint8_t *) data)[i]);
|
||||
}
|
||||
|
||||
/// send a string- look for null byte instead of expecting a length
|
||||
void serial_writestr(uint8_t *data)
|
||||
{
|
||||
|
|
@ -236,7 +227,7 @@ void serial_writestr(uint8_t *data)
|
|||
}
|
||||
|
||||
/**
|
||||
Write block from FLASH
|
||||
Write string from FLASH.
|
||||
|
||||
Extensions to output flash memory pointers. This prevents the data to
|
||||
become part of the .data segment instead of the .code segment. That means
|
||||
|
|
@ -245,15 +236,6 @@ void serial_writestr(uint8_t *data)
|
|||
For single character writes (i.e. '\n' instead of "\n"), using
|
||||
serial_writechar() directly is the better choice.
|
||||
*/
|
||||
void serial_writeblock_P(PGM_P data_P, int datalen)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < datalen; i++)
|
||||
serial_writechar(pgm_read_byte(&data_P[i]));
|
||||
}
|
||||
|
||||
/// Write string from FLASH
|
||||
void serial_writestr_P(PGM_P data_P)
|
||||
{
|
||||
uint8_t r, i = 0;
|
||||
|
|
|
|||
5
serial.h
5
serial.h
|
|
@ -29,14 +29,9 @@
|
|||
void serial_writechar(uint8_t data);
|
||||
#endif /* USB_SERIAL */
|
||||
|
||||
// read/write many characters
|
||||
// uint8_t serial_recvblock(uint8_t *block, int blocksize);
|
||||
void serial_writeblock(void *data, int datalen);
|
||||
|
||||
void serial_writestr(uint8_t *data);
|
||||
|
||||
// write from flash
|
||||
void serial_writeblock_P(PGM_P data_P, int datalen);
|
||||
void serial_writestr_P(PGM_P data_P);
|
||||
|
||||
#endif /* _SERIAL_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue