Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pwm provider cleanup #349

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,8 @@ public DigitalInput create(DigitalInputConfig config) {

@Override
public int getPriority() {
// the gpioD driver should be higher priority when on Rp1 chip
int rval = 0;
if(BoardInfoHelper.usesRP1()) {
rval = 150;
}else{
rval = 150;
}
return(rval);
// the gpioD driver should be higher priority always
return(150);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,8 @@ public DigitalOutput create(DigitalOutputConfig config) {

@Override
public int getPriority() {
// the gpioD driver should be higher priority when on RP1 chip
int rval = 0;
if(BoardInfoHelper.usesRP1()) {
rval = 150;
}else{
rval = 150;
}
return(rval);
// the gpioD driver should be higher priority always
return(150);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ public LinuxFsDigitalInputProviderImpl(String gpioFileSystemPath) {

@Override
public int getPriority() {
// the linux FS Digital driver should be higher priority than Pigpio on RP1 chip
int rval = 0;
// the linux FS Digital driver should be higher priority on RP1 chip
int rval = 50;
if(BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
rval = 50;
}
return(rval);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@ public LinuxFsDigitalOutputProviderImpl(String gpioFileSystemPath) {

@Override
public int getPriority() {
// the linux FS Digital driver should be higher priority than Pigpio on RP1 chip.
int rval = 0;
// the linux FS Digital driver should be higher priority on RP1 chip.
int rval = 50;
if(BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
rval = 50;
}
return(rval);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,8 @@ public LinuxFsI2CProviderImpl() {

@Override
public int getPriority() {
// the linux FS driver should be higher priority when on RP1 chip
int rval = 0;
if(BoardInfoHelper.usesRP1()) {
rval = 150;
}else{
rval = 150;
}
return(rval);
// the linux FS driver should always be higher priority
return(150);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ public LinuxFsPwmProviderImpl(String pwmFileSystemPath, int pwmChip) {

@Override
public int getPriority() {
// the linux FS PWM driver should be higher priority than Pigpio on RP1 chip
int rval = 0;
// the linux FS PWM driver should be higher priority on RP1 chip
int rval = 50;
if(BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
rval = 50;
}
return(rval);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ public PiGpioDigitalInputProviderImpl(PiGpio piGpio) {
@Override
public int getPriority() {
// the Pigpio driver should be higher priority when NOT on RP1 chip
int rval = 0;
if(!BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
int rval = 100;
if(BoardInfoHelper.usesRP1()) {
rval = 50;
}
return(rval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ public PiGpioDigitalOutputProviderImpl(PiGpio piGpio) {
@Override
public int getPriority() {
// the Pigpio driver should be higher priority when NOT on RP1 chip.
int rval = 0;
if(!BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
int rval = 100;
if(BoardInfoHelper.usesRP1()) {
rval = 50;
}
return(rval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ public PiGpioI2CProviderImpl(PiGpio piGpio) {
@Override
public int getPriority() {
// the Pigpio driver should be higher priority when NOT on RP1 chip
int rval = 0;
if(!BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
int rval = 100;
if(BoardInfoHelper.usesRP1()) {
rval = 50;
}
return(rval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ public PiGpioPwmProviderImpl(PiGpio piGpio) {
@Override
public int getPriority() {
// the Pigpio driver should be higher priority when NOT on RP1 chip.
int rval = 0;
if(!BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
int rval = 100;
if(BoardInfoHelper.usesRP1()) {
rval = 50;
}
return(rval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ public PiGpioSerialProviderImpl(PiGpio piGpio) {
@Override
public int getPriority() {
// the Pigpio driver should be higher priority when NOT on Rp1 chip.
int rval = 0;
if(!BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
int rval = 100;
if(BoardInfoHelper.usesRP1()) {
rval = 50;
}
return(rval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,11 @@ public PiGpioSpiProviderImpl(PiGpio piGpio) {
@Override
public int getPriority() {
// the Pigpio driver should be higher priority when NOT on RP1 chip.
int rval = 0;
if(!BoardInfoHelper.usesRP1()) {
rval = 100;
}else{
int rval = 100;
if(BoardInfoHelper.usesRP1()) {
rval = 50;
}
return(rval);

}

/**
Expand Down