DS18B20 library generating compiler errors

The library DS18B20 (community library) seems to be causing compiler errors.

I made a small change to a program I have running on a Boron that I haven't re-compiled for a while (6 months to a year) and when I went to compile the changes (just adding a dewpoint calculation with existing temperature and humidity values, no changes to reading sensor values) I got compiler errors related to the DS18B20 (community library):

lib/OneWire/src/OneWire.h:136:7: error: 'HAL_Pin_Mode' was not declared in this scope

lib/OneWire/src/OneWire.h:142:7: error: 'HAL_Pin_Mode' was not declared in this scope

I then tried compiling a fresh program using the test code from the library documentation, examples/ds18b20_SingleDropds18b20_SingleDrop.ino and got the exact same error. In both cases the error location in the .ino file is the line with the #include <DS18B20.h>. This is the error portion of the Show Raw output:

  from ds18b20singledropexample.ino:2:

lib/OneWire/src/OneWire.h: In member function 'void OneWire::pinModeFastOutput()':
lib/OneWire/src/OneWire.h:136:7: error: 'HAL_Pin_Mode' was not declared in this scope
136 | HAL_Pin_Mode(_pin, OUTPUT);
| ^~~~~~~~~~~~
lib/OneWire/src/OneWire.h: In member function 'void OneWire::pinModeFastInput()':
lib/OneWire/src/OneWire.h:142:7: error: 'HAL_Pin_Mode' was not declared in this scope
142 | HAL_Pin_Mode(_pin, INPUT);
| ^~~~~~~~~~~~

Something seems to have changed, since this code compiled a few months ago. This is the community library and ds18b20_SingleDrop says it compiled OK with Boron and all the other Particle products. I'm using the Particle Web IDE. Does anyone have any ideas how to correct or compensate for this error?

The OneWire library needs a minor change to the name of the HAL_Pin_Mode function. Since this is very difficult to do in the WebIDE, the easiest solution is to target Device OS 6.1.1, which is before that function was deprecated.

Click the > to the right of the device with the gold star in the device list and there's a popup to select the Device OS target version.

In Workbench, you can just edit public libraries.