Skip to content

Commit 61a70d3

Browse files
committed
Forward port changes from v0.6 release branch
Merge fixes and minor changes from release-0.6 branch, such as: - Minor update to gen_tcp docs - opcodesswitch: Fix LEDC.ex low_speed_mode() - Update documentaion builds to OTP 28
2 parents c470af6 + c8eed12 commit 61a70d3

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

.github/workflows/build-docs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ jobs:
6262
os: [ ubuntu-24.04 ]
6363
# The type of runner that the job will run on
6464
runs-on: ${{ matrix.os }}
65-
# Documentation currently fails to build with OTP-27 and recent OTP-26.
66-
container: erlang:26.0.2
65+
container: erlang:28.1
6766

6867
# Steps represent a sequence of tasks that will be executed as part of the job
6968
steps:

.github/workflows/publish-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
os: [ ubuntu-24.04 ]
5050
# The type of runner that the job will run on
5151
runs-on: ${{ matrix.os }}
52-
container: erlang:26.0.2
52+
container: erlang:28.1
5353

5454
# Steps represent a sequence of tasks that will be executed as part of the job
5555
steps:

libs/estdlib/src/gen_tcp.erl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
%% Caveats:
3232
%% <ul>
3333
%% <li>Limited support for socket tuning parameters</li>
34-
%% <li>No support for <b>controlling_process/2</b></li>
3534
%% </ul>
3635
%%
3736
%% <em><b>Note.</b> Port drivers for this interface are not supported

libs/exavmlib/lib/LEDC.ex

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,18 +344,23 @@ defmodule LEDC do
344344
do: throw(:nif_error)
345345

346346
@doc """
347-
Convenience function for setting ledc speed mode
347+
Convenience function for setting ledc speed mode, note that not all targets support high speed mode.
348+
Function returns low speed mode on boards that do not support high speed mode.
348349
"""
349350
@spec high_speed_mode() :: 0
350351
def high_speed_mode(),
351352
do: 0
352353

353354
@doc """
354-
Convenience function for setting ledc speed mode
355-
"""
356-
@spec low_speed_mode() :: 1
357-
def low_speed_mode(),
358-
do: 1
355+
Convenience function for setting ledc low speed mode.
356+
"""
357+
@spec low_speed_mode() :: 0 | 1
358+
def low_speed_mode() do
359+
case :erlang.system_info(:esp32_chip_info) do
360+
%{model: :esp32} -> 1
361+
_ -> 0
362+
end
363+
end
359364

360365
@doc """
361366
Convenience function for setting ledc fade mode

0 commit comments

Comments
 (0)