rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | |
| 2 | #ifndef GPIO_DRV_07_13_11 |
| 3 | #define GPIO_DRV_07_13_11 |
| 4 | |
| 5 | #include "drv_comm.h" |
| 6 | #include "dcl.h" |
| 7 | |
| 8 | #define BU_G_FLD(_i,_ms,_ls) (((_i)<<(31-(_ms))) >> (31- (_ms) + (_ls))) |
| 9 | #define BU_G_BIT(_i,_n) BU_G_FLD(_i, _n, _n) |
| 10 | |
| 11 | #ifdef __DRV_GPIO_REG_DBG__ |
| 12 | |
| 13 | #define DRV_GPIO_WriteReg(addr,data) DRV_DBG_WriteReg32(addr,data) |
| 14 | #define DRV_GPIO_Reg(addr) DRV_DBG_Reg32(addr) |
| 15 | #define DRV_GPIO_WriteReg32(addr,data) DRV_DBG_WriteReg32(addr,data) |
| 16 | #define DRV_GPIO_Reg32(addr) DRV_DBG_Reg32(addr) |
| 17 | #define DRV_GPIO_WriteReg8(addr,data) DRV_DBG_WriteReg8(addr,data) |
| 18 | #define DRV_GPIO_Reg8(addr) DRV_DBG_Reg8(addr) |
| 19 | |
| 20 | |
| 21 | #define DRV_GPIO_ClearBits(addr,data) DRV_DBG_ClearBits(addr,data) |
| 22 | #define DRV_GPIO_SetBits(addr,data) DRV_DBG_SetBits(addr,data) |
| 23 | #define DRV_GPIO_ClearBits32(addr,data) DRV_DBG_ClearBits32(addr,data) |
| 24 | #define DRV_GPIO_SetBits32(addr,data) DRV_DBG_SetBits32(addr,data) |
| 25 | #define DRV_GPIO_ClearBits8(addr,data) DRV_DBG_ClearBits8(addr,data) |
| 26 | #define DRV_GPIO_SetBits8(addr,data) DRV_DBG_SetBits8(addr,data) |
| 27 | |
| 28 | #define DRV_GPIO_SetData(addr, bitmask, value) DRV_DBG_SetData(addr, bitmask, value) |
| 29 | #define DRV_GPIO_SetData32(addr, bitmask, value) DRV_DBG_SetData32(addr, bitmask, value) |
| 30 | #define DRV_GPIO_SetData8(addr, bitmask, value) DRV_DBG_SetData8(addr, bitmask, value) |
| 31 | |
| 32 | #else //__DRV_GPIO_REG_DBG__ |
| 33 | |
| 34 | #define DRV_GPIO_WriteReg(addr,data) DRV_WriteReg32(addr,data) |
| 35 | #define DRV_GPIO_Reg(addr) DRV_Reg32(addr) |
| 36 | #define DRV_GPIO_WriteReg32(addr,data) DRV_WriteReg32(addr,data) |
| 37 | #define DRV_GPIO_Reg32(addr) DRV_Reg32(addr) |
| 38 | #define DRV_GPIO_WriteReg8(addr,data) DRV_WriteReg8(addr,data) |
| 39 | #define DRV_GPIO_Reg8(addr) DRV_Reg8(addr) |
| 40 | |
| 41 | |
| 42 | #define DRV_GPIO_ClearBits(addr,data) DRV_ClearBits32(addr,data) |
| 43 | #define DRV_GPIO_SetBits(addr,data) DRV_DBGD_SetBits32(addr,data) |
| 44 | #define DRV_GPIO_ClearBits32(addr,data) DRV_ClearBits32(addr,data) |
| 45 | #define DRV_GPIO_SetBits32(addr,data) DRV_DBGD_SetBits32(addr,data) |
| 46 | #define DRV_GPIO_ClearBits8(addr,data) DRV_ClearBits8(addr,data) |
| 47 | #define DRV_GPIO_SetBits8(addr,data) DRV_SetBits8(addr,data) |
| 48 | |
| 49 | #define DRV_GPIO_SetData(addr, bitmask, value) DRV_SetData32(addr, bitmask, value) |
| 50 | #define DRV_GPIO_SetData32(addr, bitmask, value) DRV_SetData32(addr, bitmask, value) |
| 51 | #define DRV_GPIO_SetData8(addr, bitmask, value) DRV_SetData8(addr, bitmask, value) |
| 52 | |
| 53 | #endif //__DRV_GPIO_REG_DBG__ |
| 54 | |
| 55 | #ifdef __MTK_TARGET__ |
| 56 | #define EN_GPIO_PRINTF 1 |
| 57 | |
| 58 | #if EN_GPIO_PRINTF |
| 59 | extern void dbg_print(char *fmt,...); |
| 60 | |
| 61 | #define GPIO_PRINT(fmt, var ...) do {dbg_print(fmt"\n\r", ##var);} while (0) |
| 62 | #define GPIO_PRINTN(fmt, var ...) do {dbg_print(fmt, ##var);} while (0) |
| 63 | #define GPIO_ERR(fmt, var ...) do {GPIO_PRINT("ERROR [%s:%d]"fmt, __FUNCTION__, __LINE__, ##var);} while (0) |
| 64 | #define GPIO_WARN(fmt, var ...) do {GPIO_PRINT("WARNING [%s:%d]"fmt, __FUNCTION__, __LINE__, ##var);} while (0) |
| 65 | #else |
| 66 | #define GPIO_PRINT(fmt, var ...) |
| 67 | #define GPIO_PRINTN(fmt, var ...) |
| 68 | #define GPIO_ERR(fmt, var ...) |
| 69 | #define GPIO_WARN(fmt, var ...) |
| 70 | #endif |
| 71 | #endif |
| 72 | #define REG32(addr) (*((volatile unsigned int*)(addr))) |
| 73 | #define REG32_WRITE(addr, value) do {(*((volatile unsigned int*)(addr))) = (unsigned int)(value);}while (0) |
| 74 | |
| 75 | #define GPIO_OK (0) |
| 76 | #define GPIO_FAIL (-1) |
| 77 | #if defined(MT6763) |
| 78 | #define GPIO_PIN_MAX 151 |
| 79 | #elif defined(MT6739) |
| 80 | #define GPIO_PIN_MAX 167 |
| 81 | #elif defined(MT6771) || defined(MT6765) |
| 82 | #define GPIO_PIN_MAX 179 |
| 83 | #elif defined(MT6295M) |
| 84 | #define GPIO_PIN_MAX 63 |
| 85 | #elif defined(MT3967) |
| 86 | #define GPIO_PIN_MAX 189 |
| 87 | #elif defined(MT6779) |
| 88 | #define GPIO_PIN_MAX 202 |
| 89 | #elif defined(MT6297)||defined(MERCURY) |
| 90 | #define GPIO_PIN_MAX 149 |
| 91 | #elif defined(MT6885)||defined(MT6873)||defined(MT6877) |
| 92 | #define GPIO_PIN_MAX 223 |
| 93 | #elif defined(MT6853)||defined(MT6833) |
| 94 | #define GPIO_PIN_MAX 202 |
| 95 | #elif defined(CHIP10992) |
| 96 | #define GPIO_PIN_MAX 234 |
| 97 | #endif |
| 98 | #define GPIO_AS_INPUT 0 |
| 99 | #define GPIO_AS_OUTPUT 1 |
| 100 | #define GPIO_DISABLE 0 |
| 101 | #define GPIO_ENABLE 1 |
| 102 | #define GPIO_PULL_DOWN 0 |
| 103 | #define GPIO_PULL_UP 1 |
| 104 | #define GPIO_OUTPUT_LOW 0 |
| 105 | #define GPIO_OUTPUT_HIGH 1 |
| 106 | #define GPIO_OWNERSHIP_AP 1 |
| 107 | #define GPIO_OWNERSHIP_MD 0 |
| 108 | #define GPIO_DRIVE_NUM_PER_REG 16 |
| 109 | #define GPIO_DRIVE_BIT_NUM 2 |
| 110 | |
| 111 | //#define GPIO_BASE_ADDR BASE_ADDR_MDGPIO |
| 112 | //#define GPIOMUX_BASE_ADDR BASE_ADDR_GPIOMUX |
| 113 | |
| 114 | #if defined(MT6763)||defined(MT6739)||defined(MT6771)|| defined(MT6765) || defined(MT6295M)|| defined(MT3967)||defined(MT6779)||defined(MT6297)||defined(MT6885)||defined(MERCURY)||defined(MT6873)||defined(MT6853)||defined(MT6833)||defined(MT6877)||defined(CHIP10992) |
| 115 | #define BASE_MADDR_GPIO BASE_ADDR_AP_GPIOMUX |
| 116 | typedef enum { |
| 117 | GPIO_PIN0=0, |
| 118 | GPIO_PIN1, |
| 119 | GPIO_PIN2, |
| 120 | GPIO_PIN3, |
| 121 | GPIO_PIN4, |
| 122 | GPIO_PIN5, |
| 123 | GPIO_PIN6, |
| 124 | GPIO_PIN7, |
| 125 | GPIO_PIN8, |
| 126 | GPIO_PIN9, |
| 127 | GPIO_PIN10, |
| 128 | GPIO_PIN11, |
| 129 | GPIO_PIN12, |
| 130 | GPIO_PIN13, |
| 131 | GPIO_PIN14, |
| 132 | GPIO_PIN15, |
| 133 | GPIO_PIN16, |
| 134 | GPIO_PIN17, |
| 135 | GPIO_PIN18, |
| 136 | GPIO_PIN19, |
| 137 | GPIO_PIN20, |
| 138 | GPIO_PIN21, |
| 139 | GPIO_PIN22, |
| 140 | GPIO_PIN23, |
| 141 | GPIO_PIN24, |
| 142 | GPIO_PIN25, |
| 143 | GPIO_PIN26, |
| 144 | GPIO_PIN27, |
| 145 | GPIO_PIN28, |
| 146 | GPIO_PIN29, |
| 147 | GPIO_PIN30, |
| 148 | GPIO_PIN31, |
| 149 | GPIO_PIN32, |
| 150 | GPIO_PIN33, |
| 151 | GPIO_PIN34, |
| 152 | GPIO_PIN35, |
| 153 | GPIO_PIN36, |
| 154 | GPIO_PIN37, |
| 155 | GPIO_PIN38, |
| 156 | GPIO_PIN39, |
| 157 | GPIO_PIN40, |
| 158 | GPIO_PIN41, |
| 159 | GPIO_PIN42, |
| 160 | GPIO_PIN43, |
| 161 | GPIO_PIN44, |
| 162 | GPIO_PIN45, |
| 163 | GPIO_PIN46, |
| 164 | GPIO_PIN47, |
| 165 | GPIO_PIN48, |
| 166 | GPIO_PIN49, |
| 167 | GPIO_PIN50, |
| 168 | GPIO_PIN51, |
| 169 | GPIO_PIN52, |
| 170 | GPIO_PIN53, |
| 171 | GPIO_PIN54, |
| 172 | GPIO_PIN55, |
| 173 | GPIO_PIN56, |
| 174 | GPIO_PIN57, |
| 175 | GPIO_PIN58, |
| 176 | GPIO_PIN59, |
| 177 | GPIO_PIN60, |
| 178 | GPIO_PIN61, |
| 179 | GPIO_PIN62, |
| 180 | GPIO_PIN63, |
| 181 | GPIO_PIN64, |
| 182 | GPIO_PIN65, |
| 183 | GPIO_PIN66, |
| 184 | GPIO_PIN67, |
| 185 | GPIO_PIN68, |
| 186 | GPIO_PIN69, |
| 187 | GPIO_PIN70, |
| 188 | GPIO_PIN71, |
| 189 | GPIO_PIN72, |
| 190 | GPIO_PIN73, |
| 191 | GPIO_PIN74, |
| 192 | GPIO_PIN75, |
| 193 | GPIO_PIN76, |
| 194 | GPIO_PIN77, |
| 195 | GPIO_PIN78, |
| 196 | GPIO_PIN79, |
| 197 | GPIO_PIN80, |
| 198 | GPIO_PIN81, |
| 199 | GPIO_PIN82, |
| 200 | GPIO_PIN83, |
| 201 | GPIO_PIN84, |
| 202 | GPIO_PIN85, |
| 203 | GPIO_PIN86, |
| 204 | GPIO_PIN87, |
| 205 | GPIO_PIN88, |
| 206 | GPIO_PIN89, |
| 207 | GPIO_PIN90, |
| 208 | GPIO_PIN91, |
| 209 | GPIO_PIN92, |
| 210 | GPIO_PIN93, |
| 211 | GPIO_PIN94, |
| 212 | GPIO_PIN95, |
| 213 | GPIO_PIN96, |
| 214 | GPIO_PIN97, |
| 215 | GPIO_PIN98, |
| 216 | GPIO_PIN99, |
| 217 | GPIO_PIN100, |
| 218 | GPIO_PIN101, |
| 219 | GPIO_PIN102, |
| 220 | GPIO_PIN103, |
| 221 | GPIO_PIN104, |
| 222 | GPIO_PIN105, |
| 223 | GPIO_PIN106, |
| 224 | GPIO_PIN107, |
| 225 | GPIO_PIN108, |
| 226 | GPIO_PIN109, |
| 227 | GPIO_PIN110, |
| 228 | GPIO_PIN111, |
| 229 | GPIO_PIN112, |
| 230 | GPIO_PIN113, |
| 231 | GPIO_PIN114, |
| 232 | GPIO_PIN115, |
| 233 | GPIO_PIN116, |
| 234 | GPIO_PIN117, |
| 235 | GPIO_PIN118, |
| 236 | GPIO_PIN119, |
| 237 | GPIO_PIN120, |
| 238 | GPIO_PIN121, |
| 239 | GPIO_PIN122, |
| 240 | GPIO_PIN123, |
| 241 | GPIO_PIN124, |
| 242 | GPIO_PIN125, |
| 243 | GPIO_PIN126, |
| 244 | GPIO_PIN127, |
| 245 | GPIO_PIN128, |
| 246 | GPIO_PIN129, |
| 247 | GPIO_PIN130, |
| 248 | GPIO_PIN131, |
| 249 | GPIO_PIN132, |
| 250 | GPIO_PIN133, |
| 251 | GPIO_PIN134, |
| 252 | GPIO_PIN135, |
| 253 | GPIO_PIN136, |
| 254 | GPIO_PIN137, |
| 255 | GPIO_PIN138, |
| 256 | GPIO_PIN139, |
| 257 | GPIO_PIN140, |
| 258 | GPIO_PIN141, |
| 259 | GPIO_PIN142, |
| 260 | GPIO_PIN143, |
| 261 | GPIO_PIN144, |
| 262 | GPIO_PIN145, |
| 263 | GPIO_PIN146, |
| 264 | GPIO_PIN147, |
| 265 | GPIO_PIN148, |
| 266 | GPIO_PIN149, |
| 267 | #if defined(MT6739)||defined(MT6771)|| defined(MT6765)|| defined(MT3967)||defined(MT6779)||defined(MT6297)||defined(MT6885) ||defined(MERCURY)||defined(MT6873)||defined(MT6853)||defined(MT6833)||defined(MT6877)||defined(CHIP10992) |
| 268 | GPIO_PIN150, |
| 269 | GPIO_PIN151, |
| 270 | #endif |
| 271 | #if defined(MT6739)||defined(MT6771)|| defined(MT6765)|| defined(MT3967)||defined(MT6779)||defined(MT6885)||defined(MT6873)||defined(MT6853)||defined(MT6833)||defined(MT6877)||defined(CHIP10992) |
| 272 | GPIO_PIN152, |
| 273 | GPIO_PIN153, |
| 274 | GPIO_PIN154, |
| 275 | GPIO_PIN155, |
| 276 | GPIO_PIN156, |
| 277 | GPIO_PIN157, |
| 278 | GPIO_PIN158, |
| 279 | GPIO_PIN159, |
| 280 | GPIO_PIN160, |
| 281 | GPIO_PIN161, |
| 282 | GPIO_PIN162, |
| 283 | GPIO_PIN163, |
| 284 | GPIO_PIN164, |
| 285 | GPIO_PIN165, |
| 286 | GPIO_PIN166, |
| 287 | GPIO_PIN167, |
| 288 | #endif |
| 289 | #if defined(MT6771)|| defined(MT6765)|| defined(MT3967)||defined(MT6779)||defined(MT6885)||defined(MT6873)||defined(MT6853)||defined(MT6833)||defined(MT6877)||defined(CHIP10992) |
| 290 | GPIO_PIN168, |
| 291 | GPIO_PIN169, |
| 292 | GPIO_PIN170, |
| 293 | GPIO_PIN171, |
| 294 | GPIO_PIN172, |
| 295 | GPIO_PIN173, |
| 296 | GPIO_PIN174, |
| 297 | GPIO_PIN175, |
| 298 | GPIO_PIN176, |
| 299 | GPIO_PIN177, |
| 300 | GPIO_PIN178, |
| 301 | GPIO_PIN179, |
| 302 | #endif |
| 303 | #if defined(MT3967)||defined(MT6779)||defined(MT6885)||defined(MT6873)||defined(MT6853)||defined(MT6833)||defined(MT6877)||defined(CHIP10992) |
| 304 | GPIO_PIN180, |
| 305 | GPIO_PIN181, |
| 306 | GPIO_PIN182, |
| 307 | GPIO_PIN183, |
| 308 | GPIO_PIN184, |
| 309 | GPIO_PIN185, |
| 310 | GPIO_PIN186, |
| 311 | GPIO_PIN187, |
| 312 | GPIO_PIN188, |
| 313 | GPIO_PIN189, |
| 314 | #endif |
| 315 | #if defined(MT6779)||defined(MT6885)||defined(MT6873)||defined(MT6853)||defined(MT6833)||defined(MT6877)||defined(CHIP10992) |
| 316 | GPIO_PIN190, |
| 317 | GPIO_PIN191, |
| 318 | GPIO_PIN192, |
| 319 | GPIO_PIN193, |
| 320 | GPIO_PIN194, |
| 321 | GPIO_PIN195, |
| 322 | GPIO_PIN196, |
| 323 | GPIO_PIN197, |
| 324 | GPIO_PIN198, |
| 325 | GPIO_PIN199, |
| 326 | GPIO_PIN200, |
| 327 | GPIO_PIN201, |
| 328 | GPIO_PIN202, |
| 329 | #endif |
| 330 | #if defined(MT6885)||defined(MT6873)||defined(MT6877)||defined(CHIP10992) |
| 331 | GPIO_PIN203, |
| 332 | GPIO_PIN204, |
| 333 | GPIO_PIN205, |
| 334 | GPIO_PIN206, |
| 335 | GPIO_PIN207, |
| 336 | GPIO_PIN208, |
| 337 | GPIO_PIN209, |
| 338 | GPIO_PIN210, |
| 339 | GPIO_PIN211, |
| 340 | GPIO_PIN212, |
| 341 | GPIO_PIN213, |
| 342 | GPIO_PIN214, |
| 343 | GPIO_PIN215, |
| 344 | GPIO_PIN216, |
| 345 | GPIO_PIN217, |
| 346 | GPIO_PIN218, |
| 347 | GPIO_PIN219, |
| 348 | GPIO_PIN220, |
| 349 | GPIO_PIN221, |
| 350 | GPIO_PIN222, |
| 351 | GPIO_PIN223, |
| 352 | #endif |
| 353 | #if defined(CHIP10992) |
| 354 | GPIO_PIN224, |
| 355 | GPIO_PIN225, |
| 356 | GPIO_PIN226, |
| 357 | GPIO_PIN227, |
| 358 | GPIO_PIN228, |
| 359 | GPIO_PIN229, |
| 360 | GPIO_PIN230, |
| 361 | GPIO_PIN231, |
| 362 | GPIO_PIN232, |
| 363 | GPIO_PIN233, |
| 364 | GPIO_PIN234, |
| 365 | #endif |
| 366 | } gpio_pin_e; |
| 367 | |
| 368 | #define GPIO_DIR1 (BASE_MADDR_GPIO+0x0000) |
| 369 | #define GPIO_DOUT1 (BASE_MADDR_GPIO+0x0100) |
| 370 | #define GPIO_DIN1 (BASE_MADDR_GPIO+0x0200) |
| 371 | #define GPIO_MODE1 (BASE_MADDR_GPIO+0x0300) |
| 372 | |
| 373 | |
| 374 | #define GPIO_DIR1_SET (GPIO_DIR1+0x04) |
| 375 | #define GPIO_DOUT1_SET (GPIO_DOUT1+0x04) |
| 376 | #define GPIO_MODE1_SET (GPIO_MODE1+0x04) |
| 377 | #define GPIO_DIR_SET(_no) (GPIO_DIR1_SET+(0x10*(_no))) |
| 378 | #define GPIO_DOUT_SET(_no) (GPIO_DOUT1_SET+(0x10*(_no))) |
| 379 | #define GPIO_MODE_SET(_no) (GPIO_MODE1_SET+(0x10*(_no))) |
| 380 | |
| 381 | #define GPIO_DIR1_CLR (GPIO_DIR1+0x08) |
| 382 | #define GPIO_DOUT1_CLR (GPIO_DOUT1+0x08) |
| 383 | #define GPIO_MODE1_CLR (GPIO_MODE1+0x08) |
| 384 | #define GPIO_DIR_CLR(_no) (GPIO_DIR1_CLR+(0x10*(_no))) |
| 385 | #define GPIO_DOUT_CLR(_no) (GPIO_DOUT1_CLR+(0x10*(_no))) |
| 386 | #define GPIO_MODE_CLR(_no) (GPIO_MODE1_CLR+(0x10*(_no))) |
| 387 | |
| 388 | #define GPIO_DIR(_no) (GPIO_DIR1+(0x10*(_no))) |
| 389 | #define GPIO_DOUT(_no) (GPIO_DOUT1+(0x10*(_no))) |
| 390 | #define GPIO_DIN(_no) (GPIO_DIN1+(0x10*(_no))) |
| 391 | #define GPIO_MODE(_no) (GPIO_MODE1+(0x10*(_no))) |
| 392 | #endif |
| 393 | |
| 394 | #if 0 |
| 395 | /* under construction !*/ |
| 396 | /* under construction !*/ |
| 397 | /* under construction !*/ |
| 398 | /* under construction !*/ |
| 399 | /* under construction !*/ |
| 400 | /* under construction !*/ |
| 401 | /* under construction !*/ |
| 402 | #endif |
| 403 | typedef struct _gpio_driving_gear |
| 404 | { |
| 405 | kal_uint8 mask; |
| 406 | kal_uint8 gear_cnt; |
| 407 | kal_uint16 gear_mapping[16][2]; |
| 408 | }gpio_driving_gear_t; |
| 409 | typedef struct _drv_gpio_driving_priv |
| 410 | { |
| 411 | kal_uint8 valid; |
| 412 | kal_uint8 gpio_num; |
| 413 | kal_uint8 driving_gear; |
| 414 | kal_uint8 offset; |
| 415 | kal_uint32 addr; |
| 416 | }drv_gpio_driving_priv_t; |
| 417 | |
| 418 | extern void gpio_init(void); |
| 419 | extern void GPIO_InitIO(char direction, kal_int16 port); |
| 420 | extern char GPIO_ReadIO(kal_int16 port); |
| 421 | extern void GPIO_WriteIO(char data, kal_int16 port); |
| 422 | extern char GPIO_ReturnMode(kal_int16 port); |
| 423 | extern char GPO_ReturnMode(kal_int16 port); |
| 424 | extern char GPIO_ReturnDir(kal_int16 port); |
| 425 | extern char GPIO_ReturnDout(kal_int16 port); |
| 426 | extern char GPO_ReturnDout(kal_int16 port); |
| 427 | extern void GPO_WriteIO(char data,kal_int16 port); |
| 428 | extern void GPIO_ModeSetup(kal_uint16 pin, kal_uint16 conf_dada); |
| 429 | extern void GPO_ModeSetup(kal_uint16 pin, kal_uint16 conf_dada); |
| 430 | extern void initGPIO(void); |
| 431 | extern void GPIO_PullenSetup(kal_uint16 pin, kal_bool enable); |
| 432 | extern void GPIO_DinvSetup(kal_uint16 pin, kal_bool enable); |
| 433 | extern void GPIO_SetDebugMode(kal_bool enable); |
| 434 | extern void GPIO_PullSelSetup(kal_uint16 pin, kal_bool pull_up); |
| 435 | #ifdef __CUST_NEW__ |
| 436 | extern void GPIO_InitIO_FAST(char direction, kal_int16 port); |
| 437 | extern char GPIO_ReadIO_FAST(kal_int16 port); |
| 438 | extern void GPIO_WriteIO_FAST(char data, kal_int16 port); |
| 439 | #endif/* __CUST_NEW__ */ |
| 440 | extern void GPIO_WriteIO_FAST2(char data, kal_uint16 no, kal_uint16 remainder_shift); |
| 441 | extern kal_int32 gpio_set_drive(gpio_pin_e gpio_pin,kal_uint32 drive); |
| 442 | extern kal_int32 gpio_set_ownership(kal_uint32 pin_num,kal_uint32 ownership); |
| 443 | extern kal_int32 gpio_get_drive_value(gpio_pin_e gpio_pin); |
| 444 | extern kal_int32 gpio_get_ownership(kal_uint32 pin_num); |
| 445 | #define METAMODE_GPIO 49 |
| 446 | #endif |