TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 204

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 204', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | int getchar char gets char s private int channel CircBuf pTxQueue Transmit Buffer CircBuf pRxQueue Receive Buffer Note the private data members channel pTxQueue and pRxQueue. These are initialized within the constructor and used to interface to the hardware-specific part of the serial driver described in the next section. I ll have more to say about this interface shortly but for now just be aware that the SerialPort class does not contain any code that is specific to a particular Serial Controller. All of that is hidden inside the SCC class that it references. Let s take a look at the SerialPort constructor. This routine is responsible for initializing the three private data members and configuring the requested data channel within the SCC hardware include static SCC scc Method SerialPort Description Default constructor for the serial port class. Notes Returns None defined. SerialPort SerialPort int port unsigned long baudRate unsigned int txQueueSize unsigned int rxQueueSize Initialize the logical device. switch port case PORTA channel 0 break case PORTB channel 1 break default channel -1 break Create input and output FIFOs. pTxQueue new CircBuf txQueueSize pRxQueue new CircBuf rxQueueSize Initialize the hardware device. channel channel baudRate pTxQueue pRxQueue SerialPort Once a SerialPort object has been created the aforementioned methods for sending and receiving data can be used. For example in the helloWorld function shown earlier puts Hello World is the statement that sends the text string to serial port A . SCC channel 0 . The data is sent over the serial channel at a rate of 19 200 bits per second as selected by the baudRate parameter to the SerialPort constructor. The send and receive methods rely on the circular buffers pointed to by pTxQueue and pRxQueue respectively. pTxQueue is a transmit buffer that provides overflow memory in case the rate at which characters are sent by the application exceeds the baud rate of the .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.