| 678 | |
| 679 | |
| 680 | int ToBCMPin(int* pin) { |
| 681 | if (*pin<0 || *pin>63) { |
| 682 | return FALSE; |
| 683 | } |
| 684 | switch(wiringPiMode) { |
| 685 | case WPI_MODE_PINS: |
| 686 | *pin = pinToGpio[*pin]; |
| 687 | break; |
| 688 | case WPI_MODE_PHYS: |
| 689 | *pin = physToGpio[*pin]; |
| 690 | break; |
| 691 | case WPI_MODE_GPIO: |
| 692 | return TRUE; |
| 693 | default: |
| 694 | return FALSE; |
| 695 | } |
| 696 | if (piRP1Model() && *pin>27) { |
| 697 | return FALSE; |
| 698 | } |
| 699 | return TRUE; |
| 700 | } |
| 701 | |
| 702 | |
| 703 | #define RETURN_ON_MODEL5 if (piRP1Model()) { if (wiringPiDebug) printf("Function not supported on Pi5\n"); return; } |
no test coverage detected