blob: 85e254b1be0336dab7d3c73ec7c087be1f3074c4 [file] [log] [blame]
liubin281ac462023-07-19 14:22:54 +08001#include <stdio.h>
2#include <errno.h>
3#include <unistd.h>
4#include <stdlib.h>
5#include <sys/types.h>
6#include <sys/stat.h>
7#include <string.h>
8#include <fcntl.h>
9
10#include "mbtk_log.h"
b.liub5c98e82023-09-21 15:10:53 +080011#include "mbtk_utils.h"
liubin281ac462023-07-19 14:22:54 +080012#include "ql/ql_gpio.h"
13
b.liub5c98e82023-09-21 15:10:53 +080014typedef struct {
15 int pin;
16 int gpio;
17} pin_gpio_mmap_s;
18
19static pin_gpio_mmap_s pin_gpio_mmap[] = {
20 {PINNAME_GPIO1, -1}, /*PIN-1*/
21 {PINNAME_GPIO2, -1}, /*PIN-2*/
22 {PINNAME_GPIO3, -1}, /*PIN-3*/
23 {PINNAME_GPIO4, -1}, /*PIN-4*/
24 {PINNAME_GPIO5, -1}, /*PIN-5*/
25 {PINNAME_NET_STATUS, -1}, /*PIN-6*/
26 {PINNAME_DBG_RXD, -1}, /*PIN-11*/
27 {PINNAME_DBG_TXD, -1}, /*PIN-12*/
28 {PINNAME_USIM_PRESENCE, 19}, /*PIN-13*/
29 {PINNAME_SD_INT_DET, -1}, /*PIN-23*/
30 {PINNAME_PCM_IN, 28}, /*PIN-24*/
31 {PINNAME_PCM_OUT, 27}, /*PIN-25*/
32 {PINNAME_PCM_SYNC, -1}, /*PIN-26*/
33 {PINNAME_PCM_CLK, -1}, /*PIN-27*/
34 {PINNAME_SDC2_DATA3, -1}, /*PIN-28*/
35 {PINNAME_SDC2_DATA2, -1}, /*PIN-29*/
36 {PINNAME_SDC2_DATA1, -1}, /*PIN-30*/
37 {PINNAME_SDC2_DATA0, -1}, /*PIN-31*/
38 {PINNAME_SDC2_CLK, -1}, /*PIN-32*/
39 {PINNAME_SDC2_CMD, -1}, /*PIN-33*/
40 {PINNAME_SPI_CS_N, -1}, /*PIN-37*/
41 {PINNAME_SPI_MOSI, -1}, /*PIN-38*/
42 {PINNAME_SPI_MISO, -1}, /*PIN-39*/
43 {PINNAME_SPI_CLK, -1}, /*PIN-40*/
44 {PINNAME_I2C_SCL, -1}, /*PIN-41*/
45 {PINNAME_I2C_SDA, -1}, /*PIN-42*/
46 {PINNAME_GPIO6, -1}, /*PIN-62*/
47 {PINNAME_DCD, -1}, /*PIN-63*/
48 {PINNAME_DTR, -1}, /*PIN-66*/
49 {PINNAME_MAIN_CTS, -1}, /*PIN-64*/
50 {PINNAME_MAIN_RTS, -1}, /*PIN-65*/
51 {PINNAME_MAIN_TXD, -1}, /*PIN-67*/
52 {PINNAME_MAIN_RXD, -1}, /*PIN-68*/
53 {PINNAME_RMII_RXD1, -1}, /*PIN-73*/
54 {PINNAME_RMII_RXCL, -1}, /*PIN-74*/
55 {PINNAME_RMII_CLK, 3}, /*PIN-75*/
56 {PINNAME_RMII_RXD0, 1}, /*PIN-76*/
57 {PINNAME_RMII_TXD0, -1}, /*PIN-77*/
58 {PINNAME_RMII_TXD1, -1}, /*PIN-78*/
59 {PINNAME_RMII_RXD2, -1}, /*PIN-79*/
60 {PINNAME_RMII_TXD2, -1}, /*PIN-80*/
61 {PINNAME_RMII_TX_CTRL, -1}, /*PIN-81*/
62 {PINNAME_RMII_RXD3, -1}, /*PIN-82*/
63 {PINNAME_RMII_TXCL, -1}, /*PIN-83*/
64 {PINNAME_RMII_TXD3, -1}, /*PIN-84*/
65 {PINNAME_WLAN_SLP_CLK, -1}, /*PIN-118*/
66 {PINNAME_RMII_RST, 20}, /*PIN-119*/
67 {PINNAME_RMII_INT, -1}, /*PIN-120*/
68 {PINNAME_RMII_MDIO, 17}, /*PIN-121*/
69 {PINNAME_RMII_MDC, 16}, /*PIN-122*/
70 {PINNAME_WLAN_PER_EN, 24}, /*PIN-127*/
71 {PINNAME_WLAN_WAKE, 21}, /*PIN-135*/
72 {PINNAME_WLAN_EN, 22}, /*PIN-136*/
73 {PINNAME_GPIO8, -1}, /*PIN-139*/
74};
75
liubin281ac462023-07-19 14:22:54 +080076static int gpio_export(int gpio)
77{
78 int index=0;
79 int file=-1;
80 int result =-1;
81 char pin_index_buffer[5]= {0};
82
83 char buffer[50];
84 memset(buffer,0,50);
85 sprintf(buffer,"/sys/class/gpio/gpio%d/direction", gpio);
86 if(access(buffer , F_OK) == 0)
87 {
88 LOGD("%d has export.", gpio);
89 return 0;
90 }
91
92 file = open("/sys/class/gpio/export",O_WRONLY);
93 if(file == -1)
94 {
95 LOGE("Open gpio export file fail.");
96 return -1;
97 }
98
99 memset(pin_index_buffer,0,5);
100 sprintf(pin_index_buffer,"%d", gpio);
101 result = write(file,pin_index_buffer,strlen(pin_index_buffer));
102 if(result < 0)
103 {
104 LOGE("Gpio[%d] export fail.", gpio);
105 close(file);
106 return -1;
107 }
108 close(file);
109
110 return 0;
111}
112
113static int gpio_unexport(int gpio)
114{
115 int index=0;
116 int file=-1;
117 int result =-1;
118 char pin_index_buffer[5]= {0};
119 char buffer[50];
120 memset(buffer,0,50);
121 sprintf(buffer,"/sys/class/gpio/gpio%d/direction", gpio);
122 if(access(buffer , F_OK) == -1)
123 {
124 LOGD("%d not export.", gpio);
125 return 0;
126 }
127
128 file = open("/sys/class/gpio/unexport",O_WRONLY);
129 if(file == -1)
130 {
131 LOGE("Open gpio unexport file fail.");
132 return -1;
133 }
134
135 memset(pin_index_buffer,0,5);
136 sprintf(pin_index_buffer,"%d", gpio);
137 result=write(file,pin_index_buffer,strlen(pin_index_buffer));
138 if(result < 0)
139 {
140 close(file);
141 LOGE("Gpio[%d] unexport fail.", gpio);
142 return -1;
143 }
144 close(file);
145
146 return 0;
147}
148
149static int gpio_direct_get(int gpio, char *value, int value_size)
150{
151 char buffer[50]= {0};
152 int file =-1;
153 int result =-1;
154
155 memset(buffer,0,50);
156 sprintf(buffer,"/sys/class/gpio/gpio%d/direction", gpio);
157 file = open(buffer, O_RDONLY);
158 if(file == -1)
159 {
160 LOGE("Open gpio[%d] direct fail.", gpio);
161 return -1;
162 }
163
164 memset(value, 0x0, value_size);
165 result = read(file,value,value_size);
166 if(result <= 0)
167 {
168 LOGE("Get gpio[%d] direct fail.", gpio);
169 close(file);
170 return -1;
171 }
172 close(file);
173
174 return 0;
175}
176
177
178static int gpio_direct_set(int gpio, char *value)
179{
180 char buffer[50]= {0};
181 int file =-1;
182 int result =-1;
183
184 memset(buffer,0,50);
185 sprintf(buffer,"/sys/class/gpio/gpio%d/direction", gpio);
186 file = open(buffer, O_WRONLY);
187 if(file == -1)
188 {
189 LOGE("Open gpio[%d] direct fail.", gpio);
190 return -1;
191 }
192
193 result = write(file,value,strlen(value));
194 if(result != strlen(value))
195 {
196 LOGE("Set gpio[%d] direct fail.", gpio);
197 close(file);
198 return -1;
199 }
200 close(file);
201
202 return 0;
203}
204
205static int gpio_value_get(int gpio)
206{
207 char buffer[50];
208 char path[10];
209 int file =-1;
210 int result =-1;
211 int value;
212
213 memset(path,0,50);
214 memset(buffer,0,10);
215 sprintf(path,"/sys/class/gpio/gpio%d/value", gpio);
216 file = open(path,O_RDONLY);
217 if(file == -1)
218 {
219 LOGE("Open gpio[%d] fail.", gpio);
220 return -1;
221 }
222 result = read(file,buffer,5);
223 if(result <= 0)
224 {
225 LOGE("Get gpio[%d] value fail", gpio);
226 close(file);
227 return -1;
228 }
229 close(file);
230 value = atoi(buffer);
231 return value;
232}
233
234static int gpio_value_set(int gpio, int value)
235{
236 char buffer[50]= {0};
237 int file =-1;
238 int result =-1;
239
240 memset(buffer,0,50);
241 sprintf(buffer,"/sys/class/gpio/gpio%d/value", gpio);
242 file = open(buffer,O_WRONLY);
243 if(file == -1)
244 {
245 LOGE("Open gpio[%d] value fail.", gpio);
246 return -1;
247 }
248 if(value == 0) {
249 result = write(file,"0",1);
250 } else {
251 result = write(file,"1",1);
252 }
253 if(result != 1)
254 {
255 LOGE("Set gpio[%d] value fail.", gpio);
256 close(file);
257 return -1;
258 }
259 close(file);
260
261 return 0;
262}
263
b.liub5c98e82023-09-21 15:10:53 +0800264static int pin_2_gpio(Enum_PinName pin_name)
265{
266#if 0
267 switch(pin_name){
268 case PINNAME_USIM_PRESENCE: /*PIN-13*/
269 return 19;
270 case PINNAME_PCM_IN: /*PIN-24*/
271 return 28;
272 case PINNAME_PCM_OUT: /*PIN-25*/
273 return 27;
274 case PINNAME_RMII_CLK: /*PIN-75*/
275 return 3;
276 case PINNAME_RMII_RXD0: /*PIN-76*/
277 return 1;
278 case PINNAME_RMII_RST: /*PIN-119*/
279 return 20;
280 case PINNAME_RMII_MDIO: /*PIN-121*/
281 return 17;
282 case PINNAME_RMII_MDC: /*PIN-122*/
283 return 16;
284 case PINNAME_WLAN_PER_EN: /*PIN-127*/
285 return 24;
286 case PINNAME_WLAN_WAKE: /*PIN-135*/
287 return 21;
288 case PINNAME_WLAN_EN: /*PIN-136*/
289 return 22;
290
291 // Unknown PIN.
292 case PINNAME_GPIO1: /*PIN-1*/
293 case PINNAME_GPIO2: /*PIN-2*/
294 case PINNAME_GPIO3: /*PIN-3*/
295 case PINNAME_GPIO4: /*PIN-4*/
296 case PINNAME_GPIO5: /*PIN-5*/
297 case PINNAME_NET_STATUS: /*PIN-6*/
298 case PINNAME_DBG_RXD: /*PIN-11*/
299 case PINNAME_DBG_TXD: /*PIN-12*/
300 case PINNAME_SD_INT_DET: /*PIN-23*/
301 case PINNAME_PCM_SYNC: /*PIN-26*/
302 case PINNAME_PCM_CLK: /*PIN-27*/
303 case PINNAME_SDC2_DATA3: /*PIN-28*/
304 case PINNAME_SDC2_DATA2: /*PIN-29*/
305 case PINNAME_SDC2_DATA1: /*PIN-30*/
306 case PINNAME_SDC2_DATA0: /*PIN-31*/
307 case PINNAME_SDC2_CLK: /*PIN-32*/
308 case PINNAME_SDC2_CMD: /*PIN-33*/
309 case PINNAME_SPI_CS_N: /*PIN-37*/
310 case PINNAME_SPI_MOSI: /*PIN-38*/
311 case PINNAME_SPI_MISO: /*PIN-39*/
312 case PINNAME_SPI_CLK: /*PIN-40*/
313 case PINNAME_I2C_SCL: /*PIN-41*/
314 case PINNAME_I2C_SDA: /*PIN-42*/
315 case PINNAME_GPIO6: /*PIN-62*/
316 case PINNAME_DCD: /*PIN-63*/
317 case PINNAME_DTR: /*PIN-66*/
318 case PINNAME_MAIN_CTS: /*PIN-64*/
319 case PINNAME_MAIN_RTS: /*PIN-65*/
320 case PINNAME_MAIN_TXD: /*PIN-67*/
321 case PINNAME_MAIN_RXD: /*PIN-68*/
322 case PINNAME_RMII_RXD1: /*PIN-73*/
323 case PINNAME_RMII_RXCL: /*PIN-74*/
324 case PINNAME_RMII_TXD0: /*PIN-77*/
325 case PINNAME_RMII_TXD1: /*PIN-78*/
326 case PINNAME_RMII_RXD2: /*PIN-79*/
327 case PINNAME_RMII_TXD2: /*PIN-80*/
328 case PINNAME_RMII_TX_CTRL: /*PIN-81*/
329 case PINNAME_RMII_RXD3: /*PIN-82*/
330 case PINNAME_RMII_TXCL: /*PIN-83*/
331 case PINNAME_RMII_TXD3: /*PIN-84*/
332 case PINNAME_WLAN_SLP_CLK: /*PIN-118*/
333 case PINNAME_RMII_INT: /*PIN-120*/
334 case PINNAME_GPIO8: /*PIN-139*/
335 default:
336 LOGE("Unknown PIN : %d", pin_name);
337 return -1;
338 }
339#else
340 int i = 0;
341 while(i < ARRAY_SIZE(pin_gpio_mmap)) {
342 if(pin_name == pin_gpio_mmap[i].pin) {
343 return pin_gpio_mmap[i].gpio;
344 }
345 i++;
346 }
347
348 LOGE("No found PIN : %d", pin_name);
349 return -1;
350#endif
351}
352
liubin281ac462023-07-19 14:22:54 +0800353
354/*****************************************************************
355* Function: Ql_GPIO_Init
356*
357* Description:
358* This function enables the GPIO function of the specified pin,
359* and initialize the configurations, including direction,
360* level and pull selection.
361*
362* Parameters:
363* pin_name:
364* Pin name, one value of Enum_PinName.
365* dir:
366* The initial direction of GPIO, one value of Enum_PinDirection.
367* level:
368* The initial level of GPIO, one value of Enum_PinLevel.
369* pull_sel:
370* Pull selection, one value of Enum_PinPullSel.
371* Return:
372* RES_OK, this function succeeds.
373* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
374* RES_IO_ERR, the function failed
375* other place. For example this GPIO has been using as EINT.
376*****************************************************************/
377int Ql_GPIO_Init(Enum_PinName pin_name,
378 Enum_PinDirection dir,
379 Enum_PinLevel level,
380 Enum_PinPullSel pull_sel
381 )
382{
b.liub5c98e82023-09-21 15:10:53 +0800383 int gpio = pin_2_gpio(pin_name);
384 if(gpio == -1) {
385 return RES_IO_ERROR;
386 }
387 LOGD("PIN-%d => GPIO-%d", pin_name, gpio);
388
389 if(gpio_export(gpio))
liubin281ac462023-07-19 14:22:54 +0800390 {
391 LOGE("gpio_export() fail.");
392 return RES_IO_ERROR;
393 }
394
b.liub5c98e82023-09-21 15:10:53 +0800395 if(gpio_direct_set(gpio, dir == PINDIRECTION_IN ? "in" : "out"))
liubin281ac462023-07-19 14:22:54 +0800396 {
397 LOGE("gpio_direct_set() fail.");
398 return RES_IO_ERROR;
399 }
400
b.liub5c98e82023-09-21 15:10:53 +0800401 if(gpio_value_set(gpio, level))
liubin281ac462023-07-19 14:22:54 +0800402 {
403 LOGE("gpio_value_set() fail.");
404 return RES_IO_ERROR;
405 }
406
407 // No support pull mode now.
408
409 return RES_OK;
410}
411
412/*****************************************************************
413* Function: Ql_GPIO_Base_Init
414*
415* Description:
416* This function enables the GPIO function of the specified pin.
417*
418* Parameters:
419* pin_name:
420* Pin name, one value of Enum_PinName.
421*
422* Return:
423* RES_OK, this function succeeds.
424* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
425* RES_IO_ERR, the function failed
426*****************************************************************/
427int Ql_GPIO_Base_Init(Enum_PinName pin_name );
428
429/*****************************************************************
430* Function: Ql_GPIO_SetLevel
431*
432* Description:
433* This function sets the level of the specified GPIO.
434*
435* Parameters:
436* pin_name:
437* Pin name, one value of Enum_PinName.
438* level:
439* The initial level of GPIO, one value of Enum_PinLevel.
440* Return:
441* RES_OK, this function succeeds.
442* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
443* RES_IO_ERR, the function failed
444* other place. For example this GPIO has been using as EINT.
445*****************************************************************/
446int Ql_GPIO_SetLevel(Enum_PinName pin_name, Enum_PinLevel level)
447{
b.liub5c98e82023-09-21 15:10:53 +0800448 int gpio = pin_2_gpio(pin_name);
449 if(gpio == -1) {
450 return RES_IO_ERROR;
451 }
452 LOGD("PIN-%d => GPIO-%d", pin_name, gpio);
453
454 if(gpio_value_set(gpio, level)) {
liubin281ac462023-07-19 14:22:54 +0800455 LOGE("gpio_value_set() fail.");
456 return RES_IO_ERROR;
457 } else {
458 return RES_OK;
459 }
460}
461
462/*****************************************************************
463* Function: Ql_GPIO_GetLevel
464*
465* Description:
466* This function gets the level of the specified GPIO.
467*
468* Parameters:
469* pin_name:
470* Pin name, one value of Enum_PinName.
471* Return:
472* The level value of the specified GPIO, which is
473* nonnegative integer.
474* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
475*****************************************************************/
476int Ql_GPIO_GetLevel(Enum_PinName pin_name)
477{
b.liub5c98e82023-09-21 15:10:53 +0800478 int gpio = pin_2_gpio(pin_name);
479 if(gpio == -1) {
480 return RES_IO_ERROR;
481 }
482 LOGD("PIN-%d => GPIO-%d", pin_name, gpio);
483
484 return gpio_value_get(gpio);
liubin281ac462023-07-19 14:22:54 +0800485}
486
487/*****************************************************************
488* Function: Ql_GPIO_SetDirection
489*
490* Description:
491* This function sets the direction of the specified GPIO.
492*
493* Parameters:
494* pin_name:
495* Pin name, one value of Enum_PinName.
496* dir:
497* The initial direction of GPIO, one value of Enum_PinDirection.
498* Return:
499* RES_OK, this function succeeds.
500* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
501* RES_IO_ERR, the function failed
502* other place. For example this GPIO has been using as EINT.
503*****************************************************************/
504int Ql_GPIO_SetDirection(Enum_PinName pin_name, Enum_PinDirection dir)
505{
b.liub5c98e82023-09-21 15:10:53 +0800506 int gpio = pin_2_gpio(pin_name);
507 if(gpio == -1) {
508 return RES_IO_ERROR;
509 }
510 LOGD("PIN-%d => GPIO-%d", pin_name, gpio);
511
512 if(gpio_direct_set(gpio, dir == PINDIRECTION_IN ? "in" : "out")) {
liubin281ac462023-07-19 14:22:54 +0800513 LOGE("gpio_direct_set() fail.");
514 return RES_IO_ERROR;
515 } else {
516 return RES_OK;
517 }
518}
519
520/*****************************************************************
521* Function: Ql_GPIO_GetDirection
522*
523* Description:
524* This function gets the direction of the specified GPIO.
525*
526* Parameters:
527* pin_name:
528* Pin name, one value of Enum_PinName.
529* Return:
530* 0 INPUT
531* 1 OUTPUT
532* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
533* other place. For example this GPIO has been using as EINT.
534*****************************************************************/
535int Ql_GPIO_GetDirection(Enum_PinName pin_name)
536{
537 char buff[10];
b.liub5c98e82023-09-21 15:10:53 +0800538 int gpio = pin_2_gpio(pin_name);
539 if(gpio == -1) {
540 return RES_IO_ERROR;
541 }
542 LOGD("PIN-%d => GPIO-%d", pin_name, gpio);
543
544 if(gpio_direct_get(gpio, buff, 10)) {
liubin281ac462023-07-19 14:22:54 +0800545 LOGE("gpio_direct_get() fail.");
546 return RES_IO_NOT_SUPPORT;
547 } else {
548 if(strcmp(buff, "in") == 0) {
549 return PINDIRECTION_IN;
550 } else if(strcmp(buff, "out") == 0) {
551 return PINDIRECTION_OUT;
552 } else {
553 return RES_IO_NOT_SUPPORT;
554 }
555 }
556}
557
558/*****************************************************************
559* Function: Ql_GPIO_SetPullSelection
560*
561* Description:
562* This function sets the pull selection of the specified GPIO.
563*
564* Parameters:
565* pin_name:
566* Pin name, one value of Enum_PinName.
567* Enum_PinPullSel:
568* Pull selection, one value of Enum_PinPullSel.
569* Return:
570* RES_OK, this function succeeds.
571* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
572* RES_IO_ERR, the function failed
573* other place. For example this GPIO has been using as EINT.
574*****************************************************************/
575int Ql_GPIO_SetPullSelection(Enum_PinName pin_name, Enum_PinPullSel pull_sel);
576
577/*****************************************************************
578* Function: ql_gpio_get_pull_selection
579*
580* Description:
581* This function gets the pull selection of the specified GPIO.
582*
583* Parameters:
584* pin_name:
585* Pin name, one value of Enum_PinName.
586* Return:
587* 0<<13 no pull
588* 5<<13 pull down
589* 6<<13 pull up
590*****************************************************************/
591int Ql_GPIO_GetPullSelection(Enum_PinName pin_name);
592
593
594/*****************************************************************
595* Function: Ql_GPIO_Uninit
596*
597* Description:
598* This function releases the specified GPIO that was
599* initialized by calling Ql_GPIO_Init() previously.
600* After releasing, the GPIO can be used for other purpose.
601* Parameters:
602* pin_name:
603* Pin name, one value of Enum_PinName.
604* Return:
605* RES_OK, this function succeeds.
606* RES_IO_NOT_SUPPORT, the input GPIO is invalid.
607* RES_IO_ERR, the function failed
608* other place. For example this GPIO has been using as EINT.
609*****************************************************************/
610int Ql_GPIO_Uninit(Enum_PinName pin_name)
611{
b.liub5c98e82023-09-21 15:10:53 +0800612 int gpio = pin_2_gpio(pin_name);
613 if(gpio == -1) {
614 return RES_IO_ERROR;
615 }
616 LOGD("PIN-%d => GPIO-%d", pin_name, gpio);
617
618 if(gpio_unexport(gpio))
liubin281ac462023-07-19 14:22:54 +0800619 {
620 LOGE("gpio_unexport() fail.");
621 return RES_IO_ERROR;
622 }
623
624 return RES_OK;
625}
626
627//------------------------------------------------------------------------------
628/*
629* Function: Ql_EINT_Enable
630*
631* Description:
632* Set the interrupt sense mode, and enable interrupt.
633*
634* Parameters:
635* eint_pin_name:
636* EINT pin name, one value of Enum_PinName that has
637* the interrupt function.
638*
639* eint_type:
640* Interrupt type, level-triggered or edge-triggered.
641* Now, only edge-triggered interrupt is supported.
642*
643* eint_callback:
644* call back function
645*
646* Return:
647* RES_OK, this function succeeds.
648* else failed to execute the function.
649*/
650//------------------------------------------------------------------------------
651int Ql_EINT_Enable(Enum_PinName eint_pin_name, Enum_EintType eint_type, Ql_EINT_Callback eint_callback);
652
653
654//------------------------------------------------------------------------------
655/*
656* Function: Ql_EINT_Disable
657*
658* Description:
659* Disable the interrupt sense.
660*
661* Parameters:
662* eint_pin_name:
663* EINT pin name, one value of Enum_PinName that has
664* the interrupt function.
665*
666* Return:
667* RES_OK, this function succeeds.
668* else failed to execute the function.
669*/
670//------------------------------------------------------------------------------
671int Ql_EINT_Disable(Enum_PinName eint_pin_name);
672