Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Commit 7095f2e

Browse files
committed
add setSerialParams.iocsh
1 parent e2a5d90 commit 7095f2e

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

asyn.Makefile

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2017 - Present Jeong Han Lee
2+
# Copyright (c) 2017 - 2019 Jeong Han Lee
33
# Copyright (c) 2017 - Present European Spallation Source ERIC
44
#
55
# The program is free software: you can redistribute
@@ -17,8 +17,8 @@
1717
#
1818
# Author : Jeong Han Lee
1919
20-
# Date : Tuesday, September 18 11:36:39 CEST 2018
21-
# version : 0.1.2
20+
# Date : Sunday, March 3 00:11:49 CET 2019
21+
# version : 0.1.3
2222

2323
# LEGACY_RSET should be defined before driver.makefile
2424
# require-ess from 3.0.1
@@ -297,6 +297,8 @@ SOURCES += $(DEVGPIB)/devSupportGpib.c
297297
SOURCES += $(DEVGPIB)/boSRQonOff.c
298298
DBDS += $(DEVGPIB)/devGpib.dbd
299299

300+
SCRIPTS += $(wildcard ../iocsh/*.iocsh)
301+
300302

301303
# For 3.14
302304
#drvVxi11$(OBJ): ../$(VXI11)/vxi11intr.h
@@ -327,10 +329,11 @@ $(DBDINC_DEPS): $(DBDINC_HDRS)
327329

328330

329331

332+
330333
# db rule is the default in RULES_E3, so add the empty one
331334

332335
db:
333336
#
334-
.PHONY: vlibs
335337
vlibs:
336338
#
339+
.PHONY: vlibs db

iocsh/setSerialParams.iocsh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#- ### copy setSerialParams.iocsh ###
2+
#- ### from epics-modules/ip/iocsh ###
3+
#- ###################################################
4+
#- BAUD=baudrate, BITS=data bits, STOP=stop bits,
5+
#- PARITY=none/odd/even, HANDSHAKE=none/hardware
6+
#- ###################################################
7+
#- Usage in e3
8+
#- iocshLoad("$(asyn_DIR)/setSerialParams.iocsh", "PORT=$(PORT), BAUD=9600, BITS=7, STOP=2, PARITY=odd")
9+
10+
asynSetOption("$(PORT)", -1, "baud", "$(BAUD=9600)")
11+
asynSetOption("$(PORT)", -1, "bits", "$(BITS=8)")
12+
asynSetOption("$(PORT)", -1, "stop", "$(STOP=1)")
13+
asynSetOption("$(PORT)", -1, "parity", "$(PARITY=none)")
14+
15+
#clocal=Y is software handshaking, clocal=N is hardware handshaking
16+
iocshRun('asynSetOption("$(PORT)", -1, "clocal", "$(VALUE_$(HANDSHAKE=none)=Y)"', "VALUE_hardware=N")
17+
asynSetOption("$(PORT)", -1, "crtscts", "N")

0 commit comments

Comments
 (0)