annotate src/ports.inc @ 462:1eeafeeb9287

CHANGE: Indicate "Bailout" for bailout deco plan in internal deco planer
author heinrichsweikamp
date Fri, 28 Oct 2016 11:30:50 +0200
parents 4b93354b7738
children b7eb98dbd800
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
heinrichsweikamp
parents:
diff changeset
3 ; File ports.inc
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ; Portmap
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
8 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
9 ; HISTORY
heinrichsweikamp
parents:
diff changeset
10 ; 2012-08-13 : [mH] Creation
heinrichsweikamp
parents:
diff changeset
11
heinrichsweikamp
parents:
diff changeset
12 ;----------------------------- PORTS ---------------------------------
heinrichsweikamp
parents:
diff changeset
13
heinrichsweikamp
parents:
diff changeset
14 ; PORTA: TFT_HIGH
heinrichsweikamp
parents:
diff changeset
15 ; TRIS=b'00000000'
heinrichsweikamp
parents:
diff changeset
16
heinrichsweikamp
parents:
diff changeset
17 ; PORTB
heinrichsweikamp
parents:
diff changeset
18 #DEFINE switch_left1 PORTB,1 ; Switch
heinrichsweikamp
parents:
diff changeset
19 #DEFINE switch_right2 PORTB,0 ; Switch
heinrichsweikamp
parents:
diff changeset
20 #DEFINE mcp_power PORTB,2 ; RX Power supply
113
heinrichsweikamp
parents: 0
diff changeset
21 #DEFINE s8_npower PORTB,3 ; Powers S8 Bulkhead (inverted)
0
heinrichsweikamp
parents:
diff changeset
22 #DEFINE LEDg PORTB,4 ; LED green
heinrichsweikamp
parents:
diff changeset
23 #DEFINE tft_power PORTB,5 ; via P-MOSFET (Inverted)
heinrichsweikamp
parents:
diff changeset
24 #DEFINE icsp_clk PORTB,6 ; ICSP
heinrichsweikamp
parents:
diff changeset
25 #DEFINE icsp_dat PORTB,7 ; ICSP
heinrichsweikamp
parents:
diff changeset
26 ; TRIS=b'00001011'
heinrichsweikamp
parents:
diff changeset
27
heinrichsweikamp
parents:
diff changeset
28 ; PORTC
heinrichsweikamp
parents:
diff changeset
29 #DEFINE SOSC_RC0 PORTC,0 ; SOSC
heinrichsweikamp
parents:
diff changeset
30 #DEFINE SOSC_RC1 PORTC,1 ; SOSC
heinrichsweikamp
parents:
diff changeset
31 #DEFINE TFT_PWM PORTC,2 ; TFT Backlight
heinrichsweikamp
parents:
diff changeset
32 #DEFINE I2C_RC3 PORTC,3 ; I²C
heinrichsweikamp
parents:
diff changeset
33 #DEFINE I2C_RC4 PORTC,4 ; I²C
heinrichsweikamp
parents:
diff changeset
34 #DEFINE MS5541_mosi PORTC,5 ; MS5541
heinrichsweikamp
parents:
diff changeset
35 #DEFINE uart1_RC6 PORTC,6 ; UART1 (USB)
heinrichsweikamp
parents:
diff changeset
36 #DEFINE uart1_RC7 PORTC,7 ; UART1 (USB)
heinrichsweikamp
parents:
diff changeset
37 ; TRIS=b'10011010'
heinrichsweikamp
parents:
diff changeset
38
heinrichsweikamp
parents:
diff changeset
39 ; PORTD
heinrichsweikamp
parents:
diff changeset
40 #DEFINE tft_cs PORTD,0 ; /CS
heinrichsweikamp
parents:
diff changeset
41 #DEFINE tft_rs PORTD,1 ; RS
heinrichsweikamp
parents:
diff changeset
42 #DEFINE tft_nwr PORTD,2 ; /WR
heinrichsweikamp
parents:
diff changeset
43 #DEFINE tft_rd PORTD,3 ; RD
heinrichsweikamp
parents:
diff changeset
44 #DEFINE flash_mosi PORTD,4 ; MOSI
heinrichsweikamp
parents:
diff changeset
45 #DEFINE flash_miso PORTD,5 ; MISO
heinrichsweikamp
parents:
diff changeset
46 #DEFINE flash_clk PORTD,6 ; CLK
heinrichsweikamp
parents:
diff changeset
47 #DEFINE tft_nreset PORTD,7 ; /RESET
heinrichsweikamp
parents:
diff changeset
48 ; TRIS=b'00100000'
heinrichsweikamp
parents:
diff changeset
49
heinrichsweikamp
parents:
diff changeset
50 ; PORTE
heinrichsweikamp
parents:
diff changeset
51 #DEFINE RE0_unused PORTE,0 ; unused
heinrichsweikamp
parents:
diff changeset
52 #DEFINE ir_power PORTE,1 ; Power supply for IR
415
heinrichsweikamp
parents: 209
diff changeset
53 #DEFINE charge_disable PORTE,2 ; ex. mcp_ncs (RX /CS) (Available from hardware rev x.x only)
0
heinrichsweikamp
parents:
diff changeset
54 #DEFINE LEDr PORTE,3 ; LED red
heinrichsweikamp
parents:
diff changeset
55 #DEFINE power_sw2 PORTE,4 ; Power supply for switch1 circuit
heinrichsweikamp
parents:
diff changeset
56 #DEFINE RE5_unused PORTE,5 ; unused
429
4b93354b7738 hardware_flag handling
heinrichsweikamp
parents: 415
diff changeset
57 #DEFINE lightsen_power PORTE,6 ; Power supply for lightsensor
0
heinrichsweikamp
parents:
diff changeset
58 #DEFINE flash_ncs PORTE,7 ; /CS
heinrichsweikamp
parents:
diff changeset
59 ; TRIS=b'00000000'
heinrichsweikamp
parents:
diff changeset
60
heinrichsweikamp
parents:
diff changeset
61 ; PORTF
heinrichsweikamp
parents:
diff changeset
62 ; RF1 (AN6, Batt_analog) and RF2 (AN7, Lightsensor)
209
56276a2418f9 cleanup
heinrichsweikamp
parents: 113
diff changeset
63 ; TRIS=b'01111110'
56276a2418f9 cleanup
heinrichsweikamp
parents: 113
diff changeset
64 #DEFINE NRTS PORTF,6 ; I
56276a2418f9 cleanup
heinrichsweikamp
parents: 113
diff changeset
65 #DEFINE NCTS PORTF,7 ; 0
0
heinrichsweikamp
parents:
diff changeset
66
113
heinrichsweikamp
parents: 0
diff changeset
67 ; PORTG
heinrichsweikamp
parents: 0
diff changeset
68 #DEFINE TX3_PIEZO_CFG PORTG,0
0
heinrichsweikamp
parents:
diff changeset
69 #DEFINE RG1_blocked_by_RS232_2 PORTG,1 ; unused
heinrichsweikamp
parents:
diff changeset
70 #DEFINE tsop_rx PORTG,2 ; IR (RX2)
heinrichsweikamp
parents:
diff changeset
71 ; RG3 (AN17, RSSI RX)
heinrichsweikamp
parents:
diff changeset
72 ; RG4 (32768Hz Clock out)
heinrichsweikamp
parents:
diff changeset
73 #DEFINE RG5_unused PORTG,5 ; /MCLR
heinrichsweikamp
parents:
diff changeset
74 #DEFINE RG6_unused PORTG,6 ; unavailable
heinrichsweikamp
parents:
diff changeset
75 #DEFINE RG7_unused PORTG,7 ; unavailable
heinrichsweikamp
parents:
diff changeset
76 ; TRIS=b'10001111'
heinrichsweikamp
parents:
diff changeset
77
heinrichsweikamp
parents:
diff changeset
78 ; PORTJ
heinrichsweikamp
parents:
diff changeset
79 #DEFINE RJ0_unused PORTJ,0 ; unused
heinrichsweikamp
parents:
diff changeset
80 #DEFINE RJ1_unused PORTJ,1 ; unused
113
heinrichsweikamp
parents: 0
diff changeset
81 #DEFINE CHRG_OUT PORTJ,2 ; CHRG_OUT
heinrichsweikamp
parents: 0
diff changeset
82 #DEFINE CHRG_IN PORTJ,3 ; CHRG_IN
0
heinrichsweikamp
parents:
diff changeset
83 #DEFINE vusb_in PORTJ,4 ; external power supply detect, USB enumerated
heinrichsweikamp
parents:
diff changeset
84 #DEFINE power_sw1 PORTJ,5 ; Power supply for switch2 circuit
heinrichsweikamp
parents:
diff changeset
85 #DEFINE MS5541_clk PORTJ,6 ; MS5541 mH
heinrichsweikamp
parents:
diff changeset
86 #DEFINE MS5541_miso PORTJ,7 ; MS5541 mH
heinrichsweikamp
parents:
diff changeset
87 ; TRIS=b'10010000'
heinrichsweikamp
parents:
diff changeset
88