9 #include "../kernel/event.h"
10 #include "../sf/service.h"
177 Result uartPortSessionOpenPort(
UartPortSession* s,
bool *out,
UartPort port,
u32 baud_rate,
UartFlowControlMode flow_control_mode,
u32 device_variation,
bool is_invert_tx,
bool is_invert_rx,
bool is_invert_rts,
bool is_invert_cts,
void* send_buffer,
u64 send_buffer_length,
void* receive_buffer,
u64 receive_buffer_length);
197 Result uartPortSessionOpenPortForDev(
UartPortSession* s,
bool *out,
UartPortForDev port,
u32 baud_rate,
UartFlowControlMode flow_control_mode,
u32 device_variation,
bool is_invert_tx,
bool is_invert_rx,
bool is_invert_rts,
bool is_invert_cts,
void* send_buffer,
u64 send_buffer_length,
void* receive_buffer,
u64 receive_buffer_length);
Kernel-mode event structure.
Definition: event.h:13
Service object structure.
Definition: service.h:14
PortSession.
Definition: uart.h:42
Service s
IPortSession.
Definition: uart.h:43
int64_t s64
64-bit signed integer.
Definition: types.h:28
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
u32 Result
Function error code result type.
Definition: types.h:44
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
Result uartIsSupportedBaudRateForDev(UartPortForDev port, u32 baud_rate, bool *out)
IsSupportedBaudRateForDev.
UartFlowControlMode
FlowControlMode.
Definition: uart.h:28
@ UartFlowControlMode_Hardware
Hardware.
Definition: uart.h:30
@ UartFlowControlMode_None
None.
Definition: uart.h:29
UartPort
UartPort.
Definition: uart.h:13
@ UartPort_Bluetooth
Bluetooth.
Definition: uart.h:14
@ UartPort_JoyConR
Joy-Con(R)
Definition: uart.h:15
@ UartPort_MCU
MCU.
Definition: uart.h:17
@ UartPort_JoyConL
Joy-Con(L)
Definition: uart.h:16
Result uartPortSessionOpenPort(UartPortSession *s, bool *out, UartPort port, u32 baud_rate, UartFlowControlMode flow_control_mode, u32 device_variation, bool is_invert_tx, bool is_invert_rx, bool is_invert_rts, bool is_invert_cts, void *send_buffer, u64 send_buffer_length, void *receive_buffer, u64 receive_buffer_length)
OpenPort.
Result uartIsSupportedBaudRate(UartPort port, u32 baud_rate, bool *out)
IsSupportedBaudRate.
Result uartIsSupportedDeviceVariationForDev(UartPortForDev port, u32 device_variation, bool *out)
IsSupportedDeviceVariationForDev.
UartPortForDev
UartPortForDev.
Definition: uart.h:21
@ UartPortForDev_Bluetooth
Bluetooth.
Definition: uart.h:24
@ UartPortForDev_JoyConL
Joy-Con(L)
Definition: uart.h:23
@ UartPortForDev_JoyConR
Joy-Con(R)
Definition: uart.h:22
Result uartPortSessionReceive(UartPortSession *s, void *out_data, size_t size, u64 *out)
Receive.
void uartExit(void)
Exit uart.
Result uartPortSessionUnbindPortEvent(UartPortSession *s, UartPortEventType port_event_type, bool *out)
UnbindPortEvent.
Result uartPortSessionBindPortEvent(UartPortSession *s, UartPortEventType port_event_type, s64 threshold, bool *out, Event *out_event)
BindPortEvent.
Result uartCreatePortSession(UartPortSession *s)
Creates an UartPortSession.
void uartPortSessionClose(UartPortSession *s)
Close an UartPortSession.
Result uartInitialize(void)
Initialize uart.
Result uartHasPort(UartPort port, bool *out)
HasPort.
Result uartIsSupportedPortEventForDev(UartPortForDev port, UartPortEventType port_event_type, bool *out)
IsSupportedPortEventForDev.
Result uartPortSessionGetWritableLength(UartPortSession *s, u64 *out)
GetWritableLength.
Service * uartGetServiceSession(void)
Gets the Service object for the actual uart service session.
Result uartIsSupportedFlowControlModeForDev(UartPortForDev port, UartFlowControlMode flow_control_mode, bool *out)
IsSupportedFlowControlModeForDev.
Result uartHasPortForDev(UartPortForDev port, bool *out)
HasPortForDev.
Result uartPortSessionGetReadableLength(UartPortSession *s, u64 *out)
GetReadableLength.
UartPortEventType
PortEventType.
Definition: uart.h:34
@ UartPortEventType_ReceiveBufferReady
ReceiveBufferReady.
Definition: uart.h:37
@ UartPortEventType_ReceiveEnd
ReceiveEnd.
Definition: uart.h:38
@ UartPortEventType_SendBufferEmpty
SendBufferEmpty.
Definition: uart.h:35
@ UartPortEventType_SendBufferReady
SendBufferReady.
Definition: uart.h:36
Result uartIsSupportedFlowControlMode(UartPort port, UartFlowControlMode flow_control_mode, bool *out)
IsSupportedFlowControlMode.
Result uartIsSupportedPortEvent(UartPort port, UartPortEventType port_event_type, bool *out)
IsSupportedPortEvent.
Result uartPortSessionOpenPortForDev(UartPortSession *s, bool *out, UartPortForDev port, u32 baud_rate, UartFlowControlMode flow_control_mode, u32 device_variation, bool is_invert_tx, bool is_invert_rx, bool is_invert_rts, bool is_invert_cts, void *send_buffer, u64 send_buffer_length, void *receive_buffer, u64 receive_buffer_length)
OpenPortForDev.
Result uartPortSessionSend(UartPortSession *s, const void *in_data, size_t size, u64 *out)
Send.
Result uartIsSupportedDeviceVariation(UartPort port, u32 device_variation, bool *out)
IsSupportedDeviceVariation.