The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.14-1~deb10u1 (Linux)
File Line Function
/showthread.php 895 errorHandler->error



  • 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[wiringX] bananapiM2 gpio 0 and 1 pin mode setting limits
#1
Hi,

I am going through bananapiM2 platform files in wiringX 'rewrtite' branch. In the file 'src/platform/lemaker/bananapim2.c' I see the following code for a gpio mode setting.

Code:
static int bananapiM2PinMode(int i, enum pinmode_t mode) {
        if(map[i] == -1) {
                return -1;
        }
        if((i == 0 || i == 1) && (mode != PINMODE_OUTPUT)) {
                wiringXLog(LOG_ERR, "The %s pin %d can only be used as output", bananapim2->name, i);      
                return -1;
        }
        return bananapim2->soc->pinMode(i, mode);
}

One can see that gpio 0 and 1 are forbidden to have any mode but output.

What is the reason for it? The hardware itself allows to have at least input mode for these pins.
 
Reply
  


Messages In This Thread
[wiringX] bananapiM2 gpio 0 and 1 pin mode setting limits - by beaming - 05-14-2016, 03:18 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  wiringX pin numbering woutput 6 5,686 12-30-2017, 02:05 PM
Last Post: zackdvd
  wiringX terrar 1 3,068 11-04-2014, 10:16 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)