Rev 1886 | Rev 1906 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1886 | Rev 1904 | ||
|---|---|---|---|
| Line 1035... | Line 1035... | ||
| 1035 | buf[0] = IR_NEXA2_START1; |
1035 | buf[0] = IR_NEXA2_START1; |
| 1036 | buf[1] = IR_NEXA2_HIGH; |
1036 | buf[1] = IR_NEXA2_HIGH; |
| 1037 | buf[2] = IR_NEXA2_START2; |
1037 | buf[2] = IR_NEXA2_START2; |
| 1038 | 1038 | ||
| 1039 | // TODO find out if dimmer value should be send, set different length, pad different |
1039 | // TODO find out if dimmer value should be send, set different length, pad different |
| - | 1040 | ||
| - | 1041 | return IR_NOT_CORRECT_DATA; |
|
| - | 1042 | } |
|
| - | 1043 | ||
| - | 1044 | ||
| - | 1045 | #if (IR_PROTOCOLS_USE_NEXA1) |
|
| - | 1046 | /** |
|
| - | 1047 | * Test data on NEXA protocol |
|
| - | 1048 | * http://www.elektronikforumet.com/wiki/index.php/RF_Protokoll_-_Nexa/Proove_(%C3%A4ldre,_ej_sj%C3%A4lvl%C3%A4rande) |
|
| - | 1049 | * |
|
| - | 1050 | * @param buf |
|
| - | 1051 | * Pointer to buffer to where to data to parse is stored |
|
| - | 1052 | * @param len |
|
| - | 1053 | * Length of the data |
|
| - | 1054 | * @param proto |
|
| - | 1055 | * Pointer to protocol information |
|
| - | 1056 | * @return |
|
| - | 1057 | * IR_OK if data parsed successfully, one of several errormessages if not |
|
| - | 1058 | */ |
|
| - | 1059 | int8_t parseNexa1(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto) { |
|
| - | 1060 | /* parse buf[], max is len */ |
|
| - | 1061 | ||
| - | 1062 | /* check if we have correct amount of data */ |
|
| - | 1063 | if (len != 50) { |
|
| - | 1064 | return IR_NOT_CORRECT_DATA; |
|
| - | 1065 | } |
|
| - | 1066 | uint32_t rawbitsTemp = 0; |
|
| - | 1067 | ||
| - | 1068 | proto->protocol=IR_PROTO_NEXA1; |
|
| - | 1069 | proto->timeout=IR_NEXA1_TIMEOUT; |
|
| - | 1070 | proto->data=rawbitsTemp; |
|
| - | 1071 | return IR_OK; |
|
| - | 1072 | } |
|
| - | 1073 | ||
| - | 1074 | #endif |
|
| - | 1075 | ||
| - | 1076 | /** |
|
| - | 1077 | * Expand data from Nexa1 protocol |
|
| - | 1078 | * |
|
| - | 1079 | * |
|
| - | 1080 | * @param buf |
|
| - | 1081 | * Pointer to buffer to store the expanded data |
|
| - | 1082 | * @param len |
|
| - | 1083 | * Pointer to length of the data |
|
| - | 1084 | * @param proto |
|
| - | 1085 | * Pointer to protocol information |
|
| - | 1086 | * @return |
|
| - | 1087 | * IR_OK if data expanded successfully, one of several errormessages if not |
|
| - | 1088 | */ |
|
| - | 1089 | int8_t expandNexa1(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto) { |
|
| 1040 | 1090 | ||
| 1041 | return IR_NOT_CORRECT_DATA; |
1091 | return IR_NOT_CORRECT_DATA; |
| 1042 | } |
1092 | } |
| 1043 | 1093 | ||