21 Commits

Author SHA1 Message Date
Pat Rogers
a8bd4794d1 Extensively refine code for these three serial I/O examples
* README.md
- Add new readme indicating that this host program is only intended for the
stream-based demo, and explaining how to use it

* host.adb
- Add much more comments in the header block explaining how to use this program and
why it is needed
- Parameterize the host port number instead of hard-coding it

* demo_serial_port_blocking.adb
- Use normalized (new) procedure names for Send and Receive, for consistency with
other versions
- Add comments re: baud rate and other settings required

* demo_serial_port_nonblocking.adb
- Better name for local procedure
- Add many more comments re: settings

* demo_serial_port_streaming.adb
- Replace source code in comment header block with location of the actual
code and project file.
- Add comment re: serial port settings

* peripherals_blocking.ads
- Peripheral should be a constant
- COM can now reference the designated USART, the component of Peripheral

* peripherals_nonblocking.ads
- Same as for peripherals_blocking.ads

* peripherals_streaming.ads
- Same as for peripherals_blocking.ads

* serial_io-blocking.ads
- Type Serial_Port now designates a USART rather than type Peripheral
- No longer provide call through routines for the Serial_IO package's
Initialize_Hardware and Configure since client can easily call them. Better
separation of concerns as a result.
- Change signatures of internal routines to be access-to-USART

* serial_io-blocking.adb
- Internal simplifications reflecting change to access discriminant now designating type USART
- Remove code for Initialize_Hardware and Configure, per removal from package spec

* serial_io-nonblocking.ads
- Type Serial_Port now designates a USART rather than type Peripheral
- No longer provide call through routines for Serial_IO packages
Initialize_Hardware and Configure since client can easily do so, and simplifies this package
- Change signatures of internal routines to be access-to-USART

* serial_io-nonblocking.adb
- Internal simplifications reflecting change to access discriminant now designating type USART
- Remove code for Initialize_Hardware and Configure, per removal from package spec
- Use short-circuit control forms in ISR since don't need to check both conditions, should be
a little faster

* serial_io-streaming.ads
- Type Serial_Port now designates a USART rather than type Peripheral
- No longer provide call through routines for Serial_IO packages
Initialize_Hardware and Configure since client can easily do so, and simplifies this package
- Change signatures of internal routines to be access-to-USART

* serial_io-streaming.adb
- Internal simplifications reflecting change to access discriminant now designating type USART
- Remove code for Initialize_Hardware and Configure, per removal from package spec

* serial_io.ads
- Procedure Initialize_Hardware's formal parameter is no longer an access parameter
- Procedure Configure's first formal parameter is now access to USART

* serial_io.adb
- Change to prcoedures' signatures as per spec
- Procedure Configure now uses distinguished receiver syntax for USART routines, much cleaner
2025-08-30 14:13:28 -05:00
Pat Rogers
c8c9818771 fix comment to refer to GNAT rather than CE edition bug 2025-08-30 13:24:56 -05:00
Andry Ogorodnik
e7d2a23985 Added support for Si4432 ISM Band 2025-06-14 13:46:46 +03:00
Andry Ogorodnik
e2e818b437 HM-11/cc2541 bluetooth module 2025-05-06 19:14:04 +03:00
Andry Ogorodnik
fcf8caa41f Add support for nRF24L01+ radio module 2025-02-17 18:42:46 +02:00
Pat Rogers
da9464829e corrections to serial_io facilities (#409)
demo-*:
use Unchecked_Access in these specific demos

serial_io-blocking.ads:
correct postcondition on procedure Receive so that empty content is handled properly

serial_io-nonblocking.ads:
add postconditions to procedure Receive
2022-05-30 15:40:25 +02:00
Pat Rogers
1dfd1ddf14 Significantly simplify Serial_IO.Nonblocking and revise associated files (#407)
* Significantly simplify Serial_IO.Nonblocking and revise associated files

serial_io:
Use better name for hardware init routines

serial_io.nonblocking:
Implement primary type Serial_Port directly as a protected type.
Add discriminant for IRQ priority.
Simplify transmission routine (remove a protected variable).
Remove pre/post for initialization since not worth extra complexity for type impl.
Use better names as replacements for Put/get.

serial_io.blocking:
Update names for procedures Put and Get to be same as those of package Nonblocking.
Update name for hardware init routine to be consistent with other packages.
Remove pre/post for initialization since not worth extra complexity for type impl.

serial_io.streaming:
Update names for procedures Put and Get to be same as in Blocking and Nonblocking.
Update name for hardware init routine to be consistent with other packages.
Remove pre/post for initialization since not worth extra complexity for type impl.

peripherals_nonblocking:
Specify new IRQ priority discriminant.
Remove unnecessary constant.
Improve comments.

peripherals_blocking:
Improve comments.

peripherals_streaming:
Improve comments.

demo mains:
Revise for name changes.
Improve comments.

* remove trailing blanks
2022-05-24 17:33:18 +02:00
Michael du Breuil
c1555d6cca Examples: Simplify lcd_std_out character emission 2020-02-11 12:23:41 +01:00
Michael du Breuil
2f7f7dd279 Examples: fix whitespace errors that fail GNAT style checks 2019-12-13 16:18:49 +01:00
Fabien Chouteau
281fb45cb1 examples/draw: Fix typo 2018-04-27 21:16:40 +02:00
Fabien Chouteau
e7873c90a8 Update example projects for new board support projects 2018-04-27 21:16:40 +02:00
Fabien Chouteau
36f137ad18 Fix "use clause for has no effect" errors 2018-03-09 16:59:59 +01:00
Fabien Chouteau
0c2ddc4649 Examples: Bring back the blinky and serial examples for the STM32F4 disco
Also fixes the serial example on the F429 to use only the Ravenscar full
run-time, and simplify the blinky example.
2017-12-05 18:29:49 +01:00
pat-rogers
a3937cea50 robust, safer version of GPIO_Port_Config and Configure_IO routine 2017-11-18 07:15:29 -06:00
Fabien Chouteau
3a7945c20a Use new GPRbuild attribute: Create_Missing_Dirs
And remove now useless .gitignore files and empty directories.
2017-06-27 15:58:10 +02:00
Fabien Chouteau
491448ecb2 serial_io-nonblocking.ads: Fix build error about PO contracts
I didn't investigate at all.
2017-06-27 14:52:18 +02:00
Jerome Lambourg
07524e3f89 examples/common/common.gpr: Do not specify the stack size
This is the responsibility of the final application.
2017-06-26 18:18:59 +02:00
Jerome Lambourg
b4acbb9ad9 Further refactor the board projects.
This commit in particular removes the need for aggregate projects.
2017-06-26 18:18:59 +02:00
Jerome Lambourg
1ee78d543f Remove the dependency over embedded-runtimes.
This build dependency won't work anymore with the next GNAT release as
runtimes will now require being installed into the compiler.

This commit also now generates automatically the board projects, to ease
the addition of new boards and runtimes, as well as taking into account
modifications refactoring of the library.
2017-06-26 18:16:05 +02:00
Fabien Chouteau
4270cd3a32 Create a README in examples/shared
To make sure people find their way to the project files.
2017-05-16 16:47:02 +02:00
Fabien Chouteau
3f8fb19742 Sort the example projects by boards
This is to create a simpler path for newcomers to find what's available
for the board(s) they have.
2017-05-16 12:18:37 +02:00