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

Function i2c_get_base

bsp/loongson/ls1cdev/libraries/ls1c_i2c.c:60–84  ·  view source on GitHub ↗

* ��ȡָ��i2cģ��Ļ���ַ * @I2Cx I2Cģ��ı�� */

Source from the content-addressed store, hash-verified

58 * @I2Cx I2Cģ��ı��
59 */
60void *i2c_get_base(ls1c_i2c_t I2Cx)
61{
62 void *base = NULL;
63
64 switch (I2Cx)
65 {
66 case LS1C_I2C_0:
67 base = (void *)LS1C_I2C0_BASE;
68 break;
69
70 case LS1C_I2C_1:
71 base = (void *)LS1C_I2C1_BASE;
72 break;
73
74 case LS1C_I2C_2:
75 base = (void *)LS1C_I2C2_BASE;
76 break;
77
78 default:
79 base = NULL;
80 break;
81 }
82
83 return base;
84}
85
86
87/*

Callers 6

i2c_cmdFunction · 0.85
i2c_get_statusFunction · 0.85
i2c_initFunction · 0.85
i2c_receive_dataFunction · 0.85
i2c_send_start_and_addrFunction · 0.85
i2c_send_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected