Linux API/linux2021. 5. 4. 17:55

MCU 처럼 gpio trigger interrupt를 하려면 리눅스 드라이버로 처리해야 한다고 하고

유저 어플리케이션에서는 poll로 보다가 뜨면 callback 함수 실행해주는 수 밖에 없는 듯..

 

[링크 : https://stackoverflow.com/questions/56166622/how-to-handle-gpio-interrupt-like-handling-in-linux-userspace]

[링크 : https://github.com/luisaburini/GPIO-interrupt/blob/master/gpio-poll.c]

[링크 : https://www.kernel.org/doc/Documentation/gpio/sysfs.txt]

 

+

2021.05.06

lseek() 만으로는 초기화가 안되고 read도 해주어야 초기화 되네.. 장치 특성인가?

그리고 대충(!) 하다 보니 실수로 poll 등록시 POLLIN 만 등록해놓고 POLLPRI를 체크하고 있었...

'Linux API > linux' 카테고리의 다른 글

Unhandled fault: external abort on non-linefetch  (0) 2021.05.25
Stopped (tty input)  (0) 2021.05.21
Floating point exception  (0) 2021.04.05
실행파일 not fount, FATAL: kernel too old  (0) 2021.04.05
spi 통신 예제(linux)  (0) 2021.01.28
Posted by 구차니

일단 라이트가 없어서 좀 불편(?) 했으니 지르고

포고플 배터리 문제인것 같아서 일단 또 지르고

 

요즘은 기분인진 모르겠지만 옥션에서 물건도 별로 없고 가격도 싸지 않은 느낌..

그래서 이번에는 11번가에서 지름!

 

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

국내 출장? 외근?  (0) 2021.05.11
왼쪽 새끼 발톱 파괴!  (0) 2021.05.06
으아아아 아부지!!!  (0) 2021.04.29
일이 겹치는구나 ㅠㅠ  (0) 2021.04.27
바쁜 연차  (0) 2021.04.26
Posted by 구차니

도대체 얼마나 신경을 안쓰고 살았길래..

2018년 4월 펌웨어.. 3년전 ㄷㄷ

 

 

Posted by 구차니
embeded/raspberry pi2021. 5. 3. 18:18

파워가 생각외로 비싸서 내 돈 주고 사라고 하면 못 살 것 같고

라즈베리 4 나온 시점에 3를 3대 놓고 쓰고 있음 ㅋㅋ

(tensorflow lite 크로스 빌드용으로 사용 중)

 

'embeded > raspberry pi' 카테고리의 다른 글

라즈베리2b+ 에서 vfpv3 빌드 성공!  (0) 2021.05.11
rpi eeprom / usb boot  (0) 2021.05.06
SLP (StereoPi Livestream Playground)  (0) 2021.04.30
node.red tensorflow  (0) 2021.04.24
라즈베리 파이 서포트 규격  (0) 2021.04.20
Posted by 구차니

나야 계정이 동일해서 상관은 없다고 볼수는 있지만

그래도 마음에 안드네?

전환을 안하면 로그인 자체를 못하게 해버리니 이런 그지 깽깽이들 -_-

 

 

 

'개소리 왈왈 > 블로그' 카테고리의 다른 글

해피빈 기부 룰렛  (0) 2021.07.14
해피빈 소멸예정!  (2) 2021.06.23
hoxy 6,666,666 방문자 댓글 남겨주세요!!  (4) 2021.04.22
남의 돈으로 기분내는 기부  (2) 2021.03.25
크크큭 흑화된다?  (0) 2021.03.24
Posted by 구차니

으아 돈 ㅠㅠ

별거 한 것 없는데 1.9만

 

역시 우라나라 의료보험의 위대함이라고 해야하려나 ㅠㅠ

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

샤오미 미에어 전원 케이블  (0) 2021.05.15
어린이날  (0) 2021.05.05
벌써 4월도 끝이 보이는구나..  (0) 2021.04.22
급 여름  (0) 2021.04.21
내가 운전을 이상하게 하는건가?  (0) 2021.04.18
Posted by 구차니

아오 은근히 빡세게 만들어 놨네

 

 

현재 배터리는 부풀어서 그런가 좀 벌어지고 있고

 

배터리 규격은 801525 200mAh 3.7V 3천원

두께 8mm 가로 15mm 세로 25mm 규격인 것 같은데

두께가 조금 더 얇으면 좋으려나?

아니면 부푼게 티나게 딱 맞는게 좋으려나?

 

요즘은 11번가가 옥션보다 싸네..

[링크 : http://www.11st.co.kr/products/2682015302] 3000

 

751517 4500원

두께 7.5mm 가로 15mm 세로 17mm 규격 100mAh 흐음..

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?itemno=C251390145]

 

아무튼 선을 적당히 잘 옮겨서 다시 넣었긴 한데

배터리가 부풀면서 PCB가 휘어 칩 안테나에 영향을 준건 아닌가 조금 의심..

일단은 안되던게 되니 좋긴한데 배터리 상태를 보니 불안하네..

새로 사는거 vs 배터리 구매 + 택배비 ㅠㅠ

 

+

cheerson 드론꺼는 100mAh인데 4500원 선..

이건 200mAh인데 2900원.. 방전율 차이인가?

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?itemno=B775220616]

'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

포고플 안테나 부품관련  (0) 2021.05.06
포고플 배터리식 배터리 교체  (0) 2021.05.06
usim 도착! 하지만!!  (0) 2021.04.17
삼성 dex 앱?  (0) 2021.03.11
pet 보호필름 2  (0) 2021.02.28
Posted by 구차니

 

변수 추적해보니 그게 그거인가?

  int output = interpreter->outputs()[0];
  TfLiteIntArray* output_dims = interpreter->tensor(output)->dims;
  // assume output dims to be something like (1, 1, ... ,size)
  auto output_size = output_dims->data[output_dims->size - 1];

 

    const float* detection_locations = interpreter->tensor(interpreter->outputs()[0])->data.f;
    const float* detection_classes=interpreter->tensor(interpreter->outputs()[1])->data.f;
    const float* detection_scores = interpreter->tensor(interpreter->outputs()[2])->data.f;
    const int    num_detections = *interpreter->tensor(interpreter->outputs()[3])->data.f;

    //there are ALWAYS 10 detections no matter how many objects are detectable
    //cout << "number of detections: " << num_detections << "\n";

    const float confidence_threshold = 0.5;
    for(int i = 0; i < num_detections; i++){
        if(detection_scores[i] > confidence_threshold){
            int  det_index = (int)detection_classes[i]+1;
            float y1=detection_locations[4*i  ]*cam_height;
            float x1=detection_locations[4*i+1]*cam_width;
            float y2=detection_locations[4*i+2]*cam_height;
            float x2=detection_locations[4*i+3]*cam_width;

            Rect rec((int)x1, (int)y1, (int)(x2 - x1), (int)(y2 - y1));
            rectangle(src,rec, Scalar(0, 0, 255), 1, 8, 0);
            putText(src, format("%s", Labels[det_index].c_str()), Point(x1, y1-5) ,FONT_HERSHEY_SIMPLEX,0.5, Scalar(0, 0, 255), 1, 8, 0);
        }
    }

 

 

typedef struct {
  int size;
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 6 && \
    __GNUC_MINOR__ >= 1
  int data[0];
#else
  int data[];
#endif
} TfLiteIntArray;

typedef union {
  int* i32;
  int64_t* i64;
  float* f;
  char* raw;
  const char* raw_const;
  uint8_t* uint8;
  bool* b;
  int16_t* i16;
  TfLiteComplex64* c64;
  int8_t* int8;
} TfLitePtrUnion;

typedef struct {
  TfLiteType type;
  TfLitePtrUnion data;
  TfLiteIntArray* dims;
  TfLiteQuantizationParams params;
  TfLiteAllocationType allocation_type;
  size_t bytes;
  const void* allocation;
  const char* name;
  TfLiteDelegate* delegate;
  TfLiteBufferHandle buffer_handle;
  bool data_is_stale;
  bool is_variable;
  TfLiteQuantization quantization;
} TfLiteTensor;

[링크 : https://android.googlesource.com/platform/external/tensorflow/.../tensorflow/lite/c/c_api_internal.h]

 

현재 소스에서는 common.h 로 옮겨진듯

[링크 : https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/c/common.h]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

tflite common.h  (0) 2021.05.21
imx6q neon tensorlow lite  (0) 2021.05.10
tflite example  (0) 2021.04.19
tflite convert  (0) 2021.04.16
LSTM - Long short-term memory  (0) 2021.04.16
Posted by 구차니

그런 이유로 distcc-pump 모드 시도 ㅠㅠ

 

[링크 : https://itmir.tistory.com/454]

[링크 : https://www.whatwant.com/entry/Ubuntu에서-ccache-사용하기]

'프로그램 사용 > distcc & ccache' 카테고리의 다른 글

distcc 만세!  (0) 2021.05.12
rpi distcc 성공인데 실패  (0) 2021.04.28
distcc hosts 파일과 순서  (0) 2016.10.19
distcc-pump 시도..  (0) 2016.10.18
distcc 를 DHCP 에서.. 2?  (0) 2016.10.18
Posted by 구차니
Programming/C Win32 MFC2021. 4. 30. 08:35

low level 후킹으로 좌우 쉬프트 구분은 가능한 듯

 

win32

[링크 : http://stackoverflow.com/questions/1811206]

[링크 : http://stackoverflow.com/questions/3475305]

 

 

 

linux

[링크 : http://stackoverflow.com/questions/3649874]

'Programming > C Win32 MFC' 카테고리의 다른 글

fopen exclusivly  (0) 2021.07.09
vs2019 sdi , mdi 프로젝트 생성하기  (0) 2021.07.08
strptime  (0) 2021.02.17
while(-1) 이 될까?  (0) 2019.05.24
c언어용 JSON 라이브러리 목록  (0) 2018.10.23
Posted by 구차니