mirror of
https://github.com/apache/nuttx.git
synced 2026-10-11 08:10:21 +00:00
This commit introduces 2 new fields in the onewire_master_s struct: uint64_t selected_rom, uint64_t *available_roms. The key point behind this is to allow onewire_search to capture all devices on the bus into the kernel struct. While this commit is keeping the old API (for the sake of not messing everything up), you don't have to reimplement the search of all roms in very strange ways (such as custom callbacks into the userspace). Instead of that, a generic ioctl (only a function to be called from the device driver) was implemented, that searches the bus (for a particular 1wire family), saves it and then copies it in a standard way to your application. The ioctl is called ONEWIREIOC_GETFAMILYROMS. Also as 1wire can interface multiple devices, a API telling the driver which ROM to interface was missing, this commit fixes this with the ONEWIREIOC_SETROM call. The example usage is you first get all the devices on the bus using ONEWIREIOC_GETFAMILYROMS. In your application, you choose the correct device you want to talk to. Then you call ONEWIREIOC_SETROM. And then writes, reads, ... Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com> |
||
|---|---|---|
| .. | ||
| android | ||
| arpa | ||
| crypto | ||
| cxx | ||
| net | ||
| netinet | ||
| netpacket | ||
| nuttx | ||
| ssp | ||
| sys | ||
| .gitignore | ||
| aio.h | ||
| alloca.h | ||
| assert.h | ||
| byteswap.h | ||
| ctype.h | ||
| debug.h | ||
| dirent.h | ||
| dlfcn.h | ||
| dsp.h | ||
| dspb16.h | ||
| elf.h | ||
| elf32.h | ||
| elf64.h | ||
| endian.h | ||
| err.h | ||
| errno.h | ||
| execinfo.h | ||
| fcntl.h | ||
| fixedmath.h | ||
| fnmatch.h | ||
| ftw.h | ||
| gcov.h | ||
| getopt.h | ||
| glob.h | ||
| grp.h | ||
| hex2bin.h | ||
| iconv.h | ||
| ifaddrs.h | ||
| imx_container.h | ||
| inttypes.h | ||
| iso646.h | ||
| langinfo.h | ||
| libgen.h | ||
| libintl.h | ||
| limits.h | ||
| locale.h | ||
| lzf.h | ||
| malloc.h | ||
| mqueue.h | ||
| netdb.h | ||
| nl_types.h | ||
| nxflat.h | ||
| obstack.h | ||
| poll.h | ||
| pthread.h | ||
| pty.h | ||
| pwd.h | ||
| regex.h | ||
| resolv.h | ||
| sched.h | ||
| search.h | ||
| semaphore.h | ||
| shadow.h | ||
| signal.h | ||
| spawn.h | ||
| stdbool.h | ||
| stddef.h | ||
| stdint.h | ||
| stdio.h | ||
| stdlib.h | ||
| stdnoreturn.h | ||
| string.h | ||
| strings.h | ||
| syscall.h | ||
| syslog.h | ||
| termios.h | ||
| threads.h | ||
| time.h | ||
| unistd.h | ||
| utime.h | ||
| uuid.h | ||
| wait.h | ||
| wchar.h | ||
| wctype.h | ||