📄 tsl2561.lst
字号:
923 0207 0834 movf ?a_ReadByte+1,w
924 ;tsl2561.c: 157: }
925 0208 0008 return
926 0209 _I_byte_write
927 ; _slave_address assigned to ?a_I_byte_write+0
928 0000 _I_byte_write$slave_address set ?a_I_byte_write
929 ;_slave_address stored from w
930 0209 0183 clrf 3 ;select bank 0
931 020A 00B3 movwf ?a_I_byte_write
932 ;tsl2561.c: 212: start_i2c();
933 020B 218D fcall _start_i2c
934 ;tsl2561.c: 213: send_byte(slave_address);
935 020C 0833 movf ?a_I_byte_write,w
936 020D 214F fcall _send_byte
937 ;tsl2561.c: 214: if (ack==0) iic_error();
938 020E 08AB movf _ack
939 020F 1D03 btfss 3,2
940 0210 2A14 goto l44
941 0211 158A 25B3 118A fcall _iic_error
942 0214 l44
943 ;tsl2561.c: 215: send_byte(byte_address);
944 0214 0833 movf ?_I_byte_write,w
945 0215 214F fcall _send_byte
946 ;tsl2561.c: 216: if (ack==0) iic_error();
947 0216 08AB movf _ack
948 0217 1D03 btfss 3,2
949 0218 2A1C goto l45
950 0219 158A 25B3 118A fcall _iic_error
951 021C l45
952 ;tsl2561.c: 217: send_byte(datain);
953 021C 0834 movf ?_I_byte_write+1,w
954 021D 214F fcall _send_byte
955 ;tsl2561.c: 218: if (ack==0) iic_error();
956 021E 08AB movf _ack
957 021F 1D03 btfss 3,2
958 0220 2A24 goto l46
959 0221 158A 25B3 118A fcall _iic_error
960 0224 l46
961 ;tsl2561.c: 219: stop_i2c();
962 0224 293E ljmp _stop_i2c
963 ;tsl2561.c: 222: unsigned char I_random_read(un
+ signed char address)
964 ;tsl2561.c: 223: {
965 0225 _I_random_read
966 ; _address assigned to ?a_I_random_read+0
967 0000 _I_random_read$address set ?a_I_random_read
968 ;_address stored from w
969 0225 0183 clrf 3 ;select bank 0
970 0226 00B3 movwf ?a_I_random_read
971 ;tsl2561.c: 224: start_i2c();
972 0227 218D fcall _start_i2c
973 ;tsl2561.c: 225: send_byte(0xa0);
974 0228 30A0 movlw -96
975 0229 214F fcall _send_byte
976 ;tsl2561.c: 226: if (ack==0) iic_error();
977 022A 08AB movf _ack
978 022B 1D03 btfss 3,2
979 022C 2A30 goto l48
980 022D 158A 25B3 118A fcall _iic_error
981 0230 l48
982 ;tsl2561.c: 227: send_byte(address);
983 0230 0833 movf ?a_I_random_read,w
984 0231 214F fcall _send_byte
985 ;tsl2561.c: 228: if (ack==0) iic_error();
986 0232 08AB movf _ack
987 0233 1D03 btfss 3,2
988 0234 2A38 goto l49
989 0235 158A 25B3 118A fcall _iic_error
990 0238 l49
991 ;tsl2561.c: 229: start_i2c();
992 0238 218D fcall _start_i2c
993 ;tsl2561.c: 230: send_byte(0xa1);
994 0239 30A1 movlw -95
995 023A 214F fcall _send_byte
996 ;tsl2561.c: 231: if (ack==0) iic_error();
997 023B 08AB movf _ack
998 023C 1D03 btfss 3,2
999 023D 2A41 goto l50
1000 023E 158A 25B3 118A fcall _iic_error
1001 0241 l50
1002 ;tsl2561.c: 232: data=receive_byte();
1003 0241 211A fcall _receive_byte
1004 0242 00AC movwf _data
1005 ;tsl2561.c: 233: stop_i2c();
1006 0243 213E fcall _stop_i2c
1007 ;tsl2561.c: 234: return (data);
1008 0244 082C movf _data,w
1009 ;tsl2561.c: 236: }
1010 0245 0008 return
1011 ;tsl2561.c: 241: void SlaveWriteByte(unsigned c
+ har Slavedata)
1012 ;tsl2561.c: 242: {
1013 0246 _SlaveWriteByte
1014 ; _Slavedata assigned to ?a_SlaveWriteByte+0
1015 0000 _SlaveWriteByte$Slavedata set ?a_SlaveWriteByte
1016 ;_Slavedata stored from w
1017 0246 0183 clrf 3 ;select bank 0
1018 0247 00B3 movwf ?a_SlaveWriteByte
1019 ;tsl2561.c: 243: start_i2c();
1020 0248 218D fcall _start_i2c
1021 ;tsl2561.c: 244: send_byte(0x7E);
1022 0249 307E movlw 126
1023 024A 214F fcall _send_byte
1024 ;tsl2561.c: 245: if (ack==0) iic_error();
1025 024B 08AB movf _ack
1026 024C 1D03 btfss 3,2
1027 024D 2A51 goto l52
1028 024E 158A 25B3 118A fcall _iic_error
1029 0251 l52
1030 ;tsl2561.c: 246: send_byte(Slavedata);
1031 0251 0833 movf ?a_SlaveWriteByte,w
1032 0252 214F fcall _send_byte
1033 ;tsl2561.c: 247: if (ack==0) iic_error();
1034 0253 08AB movf _ack
1035 0254 1D03 btfss 3,2
1036 0255 2A59 goto l53
1037 0256 158A 25B3 118A fcall _iic_error
1038 0259 l53
1039 ;tsl2561.c: 249: stop_i2c();
1040 0259 293E ljmp _stop_i2c
1041 025A _SlaveWriteWord
1042 ; _mastercommand assigned to ?a_SlaveWriteWord+
+ 0
1043 0000 _SlaveWriteWord$mastercommand set ?a_SlaveWrite
+ Word
1044 ;_mastercommand stored from w
1045 025A 0183 clrf 3 ;select bank 0
1046 025B 00B3 movwf ?a_SlaveWriteWord
1047 ;tsl2561.c: 254: start_i2c();
1048 025C 218D fcall _start_i2c
1049 ;tsl2561.c: 255: send_byte(0x7E);
1050 025D 307E movlw 126
1051 025E 214F fcall _send_byte
1052 ;tsl2561.c: 256: if (ack==0) iic_error();
1053 025F 08AB movf _ack
1054 0260 1D03 btfss 3,2
1055 0261 2A65 goto l55
1056 0262 158A 25B3 118A fcall _iic_error
1057 0265 l55
1058 ;tsl2561.c: 257: send_byte(mastercommand);
1059 0265 0833 movf ?a_SlaveWriteWord,w
1060 0266 214F fcall _send_byte
1061 ;tsl2561.c: 258: if (ack==0) iic_error();
1062 0267 08AB movf _ack
1063 0268 1D03 btfss 3,2
1064 0269 2A6D goto l56
1065 026A 158A 25B3 118A fcall _iic_error
1066 026D l56
1067 ;tsl2561.c: 259: send_byte(masterdata);
1068 026D 0833 movf ?_SlaveWriteWord,w
1069 026E 214F fcall _send_byte
1070 ;tsl2561.c: 260: if (ack==0) iic_error();
1071 026F 08AB movf _ack
1072 0270 1D03 btfss 3,2
1073 0271 2A75 goto l57
1074 0272 158A 25B3 118A fcall _iic_error
1075 0275 l57
1076 ;tsl2561.c: 262: stop_i2c();
1077 0275 293E ljmp _stop_i2c
1078 ;tsl2561.c: 296: unsigned char SlaveReadByte(un
+ signed char slavecommand)
1079 ;tsl2561.c: 297: {
1080 0276 _SlaveReadByte
1081 ; _slavecommand assigned to ?a_SlaveReadByte+0
1082 0000 _SlaveReadByte$slavecommand set ?a_SlaveReadByt
+ e
1083 ; _receiveslavedata assigned to ?a_SlaveReadByt
+ e+1
1084 0000 _SlaveReadByte$receiveslavedata set ?a_SlaveRea
+ dByte+1
1085 ;_slavecommand stored from w
1086 0276 0183 clrf 3 ;select bank 0
1087 0277 00B3 movwf ?a_SlaveReadByte
1088 ;tsl2561.c: 298: unsigned char receiveslavedata
+ ;
1089 0278 218D fcall _start_i2c
1090 ;tsl2561.c: 300: send_byte(0x7E);
1091 0279 307E movlw 126
1092 027A 214F fcall _send_byte
1093 ;tsl2561.c: 301: if (ack==0) iic_error();
1094 027B 08AB movf _ack
1095 027C 1D03 btfss 3,2
1096 027D 2A81 goto l67
1097 027E 158A 25B3 118A fcall _iic_error
1098 0281 l67
1099 ;tsl2561.c: 302: send_byte(slavecommand);
1100 0281 0833 movf ?a_SlaveReadByte,w
1101 0282 214F fcall _send_byte
1102 ;tsl2561.c: 303: if (ack==0) iic_error();
1103 0283 08AB movf _ack
1104 0284 1D03 btfss 3,2
1105 0285 2A89 goto l68
1106 0286 158A 25B3 118A fcall _iic_error
1107 0289 l68
1108 ;tsl2561.c: 304: start_i2c();
1109 0289 218D fcall _start_i2c
1110 ;tsl2561.c: 305: send_byte(0x7F);
1111 028A 307F movlw 127
1112 028B 214F fcall _send_byte
1113 ;tsl2561.c: 306: if (ack==0) iic_error();
1114 028C 08AB movf _ack
1115 028D 1D03 btfss 3,2
1116 028E 2A92 goto l69
1117 028F 158A 25B3 118A fcall _iic_error
1118 0292 l69
1119 ;tsl2561.c: 308: receiveslavedata=slavereceive_
+ byte();
1120 0292 20F6 fcall _slavereceive_byte
1121 0293 00B4 movwf ?a_SlaveReadByte+1
1122 ;tsl2561.c: 310: stop_i2c();
1123 0294 213E fcall _stop_i2c
1124 ;tsl2561.c: 311: return(receiveslavedata);
1125 0295 0834 movf ?a_SlaveReadByte+1,w
1126 ;tsl2561.c: 313: }
1127 0296 0008 return
1128 ;tsl2561.c: 316: unsigned char MastertestSlave(
+ )
1129 ;tsl2561.c: 317: { unsigned char receivetestdat
+ a;
1130 0297 _MastertestSlave
1131 ; _receivetestdata assigned to ?a_MastertestSla
+ ve+0
1132 0000 _MastertestSlave$receivetestdata set ?a_Mastert
+ estSlave
1133 ;tsl2561.c: 318: start_i2c();
1134 0297 218D fcall _start_i2c
1135 ;tsl2561.c: 319: send_byte(0x7F);
1136 0298 307F movlw 127
1137 0299 214F fcall _send_byte
1138 ;tsl2561.c: 320: if (ack==0) iic_error();
1139 029A 08AB movf _ack
1140 029B 1D03 btfss 3,2
1141 029C 2AA0 goto l71
1142 029D 158A 25B3 118A fcall _iic_error
1143 02A0 l71
1144 ;tsl2561.c: 322: receivetestdata=slavereceive_b
+ yte();
1145 02A0 20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -