TAILIEUCHUNG - Open-Source Robotics And Proces Control Cookbook Edwards L 242P Newnes Elsevier 2005 Part 9

Tham khảo tài liệu 'open-source robotics and proces control cookbook edwards l 242p newnes elsevier 2005 part 9', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 4 You use the PPRSTATUS ioctl simply by passing a pointer to a 1-byte buffer to store the port s current status unsigned char c ioctl handle PPRSTATUS c Reading and writing the data lines is achieved using the same syntax as for PPRSTATUS but the two ioctls are PPRDATA and PPWDATA respectively. Note that before reading or writing the data bus you must ensure that it has been set into the correct mode input or output using the PPDATADIR ioctl. For example take this code which reads a byte from the data bus then writes a different byte int i char cl c2 An arbitrary byte to be written to the port c2 0xf5 Set port to input mode c1 0xff ioctl handle PPWDATA c1 i -1 ioctl handle PPDATADIR i Read byte from port ioctl handle PPRDATA c1 Write new data to port and set it to output mode ioctl handle PPWDATA c2 i 0 ioctl handle PPDATADIR i Note how we write 0xFF to the output latch before we read the port. The reason for this is that when the port is in readback mode the output latches are open-collector. Writing 0xFF to the data latch effectively tristates the outputs so they don t try to pull down signals from the outside world. Also note that you can t really mix and match either the entire port is an input or the entire port is an output. You can t specify the data direction at a finer resolution although there are terrifying hardware tricks to work around this limitation. 148 The Linux-Based Controller A Soft Task Implementing Graphical Control Interfaces Introduction In this section I m going to give you a very short overview of the options available to you when implementing graphical control overmonitoring interfaces on Linux systems. In particular I m going to concentrate on interfaces that lend themselves well to embedded-friendly feature paring. This text is obviously not intended to be an indepth how-to guide for any of the specific graphics systems I mention. It s intended to show you the advantages and disadvantages of a number of different .

TỪ KHÓA LIÊN QUAN
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.