#include <sys/EfiCdefs.h>\r
\r
__BEGIN_DECLS\r
+\r
+/** Get input baud rate.\r
+\r
+ Extracts the input baud rate from the termios structure pointed to by the\r
+ pTermios argument.\r
+\r
+ @param[in] pTermios A pointer to the termios structure from which to extract\r
+ the input baud rate.\r
+\r
+ @return The value of the input speed is returned exactly as it is contained\r
+ in the termios structure, without interpretation.\r
+**/\r
speed_t cfgetispeed (const struct termios *);\r
+\r
+/** Get output baud rate.\r
+\r
+ Extracts the output baud rate from the termios structure pointed to by the\r
+ pTermios argument.\r
+\r
+ @param[in] pTermios A pointer to the termios structure from which to extract\r
+ the output baud rate.\r
+\r
+ @return The value of the output speed is returned exactly as it is contained\r
+ in the termios structure, without interpretation.\r
+**/\r
speed_t cfgetospeed (const struct termios *);\r
+\r
+/** Set input baud rate.\r
+\r
+ Replaces the input baud rate, in the termios structure pointed to by the\r
+ pTermios argument, with the value of NewSpeed.\r
+\r
+ @param[out] pTermios A pointer to the termios structure into which to set\r
+ the input baud rate.\r
+ @param[in] NewSpeed The new input baud rate.\r
+\r
+ @retval 0 The operation completed successfully.\r
+ @retval -1 An error occured and errno is set to indicate the error.\r
+ * EINVAL - The value of NewSpeed is outside the range of\r
+ possible speed values as specified in <sys/termios.h>.\r
+**/\r
int cfsetispeed (struct termios *, speed_t);\r
+\r
+/** Set output baud rate.\r
+\r
+ Replaces the output baud rate, in the termios structure pointed to by the\r
+ pTermios argument, with the value of NewSpeed.\r
+\r
+ @param[out] pTermios A pointer to the termios structure into which to set\r
+ the output baud rate.\r
+ @param[in] NewSpeed The new output baud rate.\r
+\r
+ @retval 0 The operation completed successfully.\r
+ @retval -1 An error occured and errno is set to indicate the error.\r
+ * EINVAL - The value of NewSpeed is outside the range of\r
+ possible speed values as specified in <sys/termios.h>.\r
+**/\r
int cfsetospeed (struct termios *, speed_t);\r
+\r
+/** Get the parameters associated with an interactive IO device.\r
+\r
+ Get the parameters associated with the device referred to by\r
+ fd and store them into the termios structure referenced by pTermios.\r
+\r
+ @param[in] fd The file descriptor for an open interactive IO device.\r
+ @param[out] pTermios A pointer to a termios structure into which to store\r
+ attributes of the interactive IO device.\r
+\r
+ @retval 0 The operation completed successfully.\r
+ @retval -1 An error occured and errno is set to indicate the error.\r
+ * EBADF - The fd argument is not a valid file descriptor.\r
+ * ENOTTY - The file associated with fd is not an interactive IO device.\r
+**/\r
int tcgetattr (int, struct termios *);\r
+\r
+/** Set the parameters associated with an interactive IO device.\r
+\r
+ Set the parameters associated with the device referred to by\r
+ fd to the values in the termios structure referenced by pTermios.\r
+\r
+ Behavior is modified by the value of the OptAct parameter:\r
+ * TCSANOW: The change shall occur immediately.\r
+ * TCSADRAIN: The change shall occur after all output written to fd is\r
+ transmitted. This action should be used when changing parameters which\r
+ affect output.\r
+ * TCSAFLUSH: The change shall occur after all output written to fd is\r
+ transmitted, and all input so far received but not read shall be\r
+ discarded before the change is made.\r
+\r
+ @param[in] fd The file descriptor for an open interactive IO device.\r
+ @param[in] OptAct Currently has no effect.\r
+ @param[in] pTermios A pointer to a termios structure into which to retrieve\r
+ attributes to set in the interactive IO device.\r
+\r
+ @retval 0 The operation completed successfully.\r
+ @retval -1 An error occured and errno is set to indicate the error.\r
+ * EBADF - The fd argument is not a valid file descriptor.\r
+ * ENOTTY - The file associated with fd is not an interactive IO device.\r
+**/\r
int tcsetattr (int, int, const struct termios *);\r
+\r
+/** Transmit pending output.\r
+\r
+\r
+ @param[in] fd The file descriptor for an open interactive IO device.\r
+\r
+ @retval 0 The operation completed successfully.\r
+ @retval -1 An error occured and errno is set to indicate the error.\r
+ * EBADF - The fd argument is not a valid file descriptor.\r
+ * ENOTTY - The file associated with fd is not an interactive IO device.\r
+ * EINTR - A signal interrupted tcdrain().\r
+ * ENOTSUP - This function is not supported.\r
+**/\r
int tcdrain (int);\r
+\r
+/** Suspend or restart the transmission or reception of data.\r
+\r
+ This function will suspend or resume transmission or reception of data on\r
+ the file referred to by fd, depending on the value of Action.\r
+\r
+ @param[in] fd The file descriptor of an open interactive IO device (terminal).\r
+ @param[in] Action The action to be performed:\r
+ * TCOOFF - Suspend output.\r
+ * TCOON - Resume suspended output.\r
+ * TCIOFF - If fd refers to an IIO device, transmit a\r
+ STOP character, which is intended to cause the\r
+ terminal device to stop transmitting data.\r
+ * TCION - If fd refers to an IIO device, transmit a\r
+ START character, which is intended to cause the\r
+ terminal device to start transmitting data.\r
+\r
+ @retval 0 The operation completed successfully.\r
+ @retval -1 An error occured and errno is set to indicate the error.\r
+ * EBADF - The fd argument is not a valid file descriptor.\r
+ * ENOTTY - The file associated with fd is not an interactive IO device.\r
+ * EINVAL - The Action argument is not a supported value.\r
+ * ENOTSUP - This function is not supported.\r
+**/\r
int tcflow (int, int);\r
+\r
+/** Discard non-transmitted output data, non-read input data, or both.\r
+\r
+\r
+ @param[in] fd The file descriptor for an open interactive IO device.\r
+ @param[in] QueueSelector The IO queue to be affected:\r
+ * TCIFLUSH - If fd refers to a device open for input, flush\r
+ pending input. Otherwise error EINVAL.\r
+ * TCOFLUSH - If fd refers to a device open for output,\r
+ flush pending output. Otherwise error EINVAL.\r
+ * TCIOFLUSH - If fd refers to a device open for both\r
+ input and output, flush pending input and output.\r
+ Otherwise error EINVAL.\r
+\r
+ @retval 0 The operation completed successfully.\r
+ @retval -1 An error occured and errno is set to indicate the error.\r
+ * EBADF - The fd argument is not a valid file descriptor.\r
+ * ENOTTY - The file associated with fd is not an interactive IO device.\r
+ * EINVAL - The QueueSelector argument is not a supported value.\r
+ * ENOTSUP - This function is not supported.\r
+**/\r
int tcflush (int, int);\r
+\r
//int tcsendbreak (int, int);\r
//pid_t tcgetsid (int);\r
\r
-\r
//void cfmakeraw (struct termios *);\r
//int cfsetspeed (struct termios *, speed_t);\r
__END_DECLS\r