Hardware studies specific

From Wiki at Neela Nurseries
Revision as of 22:58, 2 May 2022 by Ted (talk | contribs) (To identify first reference to routine i2c_configure() in Zephyr based project build artifacts.)
Jump to: navigation, search

2022-05-02 Monday

Search for Zephyr's I2C peripheral configuration code . . .

ted@localhost:~/projects/zephyr-based/hardware-Stage1-firmware-aws-iot-stand-alone/build$ grep -nr i2c_configure ./*
./mcuboot/zephyr/include/generated/syscall_dispatch.c:668:uintptr_t z_mrsh_i2c_configure(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3,
./mcuboot/zephyr/include/generated/syscall_dispatch.c:1412:	[K_SYSCALL_I2C_CONFIGURE] = z_mrsh_i2c_configure,
./mcuboot/zephyr/include/generated/syscalls/i2c.h:24:extern int z_impl_i2c_configure(const struct device * dev, uint32_t dev_config);
./mcuboot/zephyr/include/generated/syscalls/i2c.h:25:static inline int i2c_configure(const struct device * dev, uint32_t dev_config)
./mcuboot/zephyr/include/generated/syscalls/i2c.h:33:	return z_impl_i2c_configure(dev, dev_config);
./mcuboot/zephyr/include/generated/syscalls/i2c_configure_mrsh.c:10:extern int z_vrfy_i2c_configure(const struct device * dev, uint32_t dev_config);
./mcuboot/zephyr/include/generated/syscalls/i2c_configure_mrsh.c:11:uintptr_t z_mrsh_i2c_configure(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2,
./mcuboot/zephyr/include/generated/syscalls/i2c_configure_mrsh.c:19:	int ret = z_vrfy_i2c_configure(*(const struct device **)&arg0, *(uint32_t*)&arg1)
./mcuboot/zephyr/misc/generated/syscalls.json:1159:            "int i2c_configure",
./spm/zephyr/include/generated/syscall_dispatch.c:668:uintptr_t z_mrsh_i2c_configure(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3,
./spm/zephyr/include/generated/syscall_dispatch.c:1412:	[K_SYSCALL_I2C_CONFIGURE] = z_mrsh_i2c_configure,
./spm/zephyr/include/generated/syscalls/i2c.h:24:extern int z_impl_i2c_configure(const struct device * dev, uint32_t dev_config);
./spm/zephyr/include/generated/syscalls/i2c.h:25:static inline int i2c_configure(const struct device * dev, uint32_t dev_config)
./spm/zephyr/include/generated/syscalls/i2c.h:33:	return z_impl_i2c_configure(dev, dev_config);
./spm/zephyr/include/generated/syscalls/i2c_configure_mrsh.c:10:extern int z_vrfy_i2c_configure(const struct device * dev, uint32_t dev_config);
./spm/zephyr/include/generated/syscalls/i2c_configure_mrsh.c:11:uintptr_t z_mrsh_i2c_configure(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2,
./spm/zephyr/include/generated/syscalls/i2c_configure_mrsh.c:19:	int ret = z_vrfy_i2c_configure(*(const struct device **)&arg0, *(uint32_t*)&arg1)
./spm/zephyr/misc/generated/syscalls.json:1159:            "int i2c_configure",
./zephyr/include/generated/syscall_dispatch.c:668:uintptr_t z_mrsh_i2c_configure(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3,
./zephyr/include/generated/syscall_dispatch.c:1412:	[K_SYSCALL_I2C_CONFIGURE] = z_mrsh_i2c_configure,
./zephyr/include/generated/syscalls/i2c.h:24:extern int z_impl_i2c_configure(const struct device * dev, uint32_t dev_config);
./zephyr/include/generated/syscalls/i2c.h:25:static inline int i2c_configure(const struct device * dev, uint32_t dev_config)
./zephyr/include/generated/syscalls/i2c.h:33:	return z_impl_i2c_configure(dev, dev_config);
./zephyr/include/generated/syscalls/i2c_configure_mrsh.c:10:extern int z_vrfy_i2c_configure(const struct device * dev, uint32_t dev_config);
./zephyr/include/generated/syscalls/i2c_configure_mrsh.c:11:uintptr_t z_mrsh_i2c_configure(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2,
./zephyr/include/generated/syscalls/i2c_configure_mrsh.c:19:	int ret = z_vrfy_i2c_configure(*(const struct device **)&arg0, *(uint32_t*)&arg1)
./zephyr/misc/generated/syscalls.json:1159:            "int i2c_configure",
ted@vibratsiya:~/projects/zephyr-based/hardware-Stage1-firmware-aws-iot-stand-alone/build$


- STEP - To identify first reference to routine i2c_configure() in Zephyr based project build artifacts.

An excerpt from file `ncs/project_root/build/zephyr/include/generated/syscalls/i2c.h:

 24 extern int z_impl_i2c_configure(const struct device * dev, uint32_t dev_config);
 25 static inline int i2c_configure(const struct device * dev, uint32_t dev_config)
 26 {
 27 #ifdef CONFIG_USERSPACE
 28         if (z_syscall_trap()) {
 29                 return (int) arch_syscall_invoke2(*(uintptr_t *)&dev, *(uintptr_t *)&dev_config, K_SYSCALL_I2C_CONFIGURE);
 30         }
 31 #endif
 32         compiler_barrier();
 33         return z_impl_i2c_configure(dev, dev_config);
 34 }