MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ls1c_pin_write

Function ls1c_pin_write

bsp/loongson/ls1cdev/drivers/drv_gpio.c:37–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36
37void ls1c_pin_write(struct rt_device *device, rt_base_t pin, rt_uint8_t value)
38{
39 unsigned int gpio = pin;
40
41 if (PIN_LOW == value)
42 {
43 gpio_set(gpio, gpio_level_low);
44 }
45 else
46 {
47 gpio_set(gpio, gpio_level_high);
48 }
49
50 return ;
51}
52
53
54rt_ssize_t ls1c_pin_read(struct rt_device *device, rt_base_t pin)

Callers

nothing calls this directly

Calls 1

gpio_setFunction · 0.50

Tested by

no test coverage detected